summaryrefslogtreecommitdiff
path: root/machines/bosco
diff options
context:
space:
mode:
Diffstat (limited to 'machines/bosco')
-rw-r--r--machines/bosco/default.nix48
-rw-r--r--machines/bosco/disko.nix64
2 files changed, 98 insertions, 14 deletions
diff --git a/machines/bosco/default.nix b/machines/bosco/default.nix
index 621710f..e519f56 100644
--- a/machines/bosco/default.nix
+++ b/machines/bosco/default.nix
@@ -8,26 +8,31 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
+ ./disko.nix
+
./reverse-proxy.nix
+ # ../biski/portforward.nix
../../modules/nixos/headscale.nix
../../modules/nixos/cgit.nix
];
-
+ nixpkgs.hostPlatform = "x86_64-linux";
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
- # boot.loader.grub.efiSupport = true;
+ boot.loader.grub.efiSupport = true;
# boot.loader.grub.efiInstallAsRemovable = true;
- # boot.loader.efi.efiSysMountPoint = "/boot/efi";
+ boot.loader.efi.efiSysMountPoint = "/boot";
# Define on which hard drive you want to install Grub.
- boot.loader.grub.device = "nodev";
- boot.loader.timeout = 10;
- boot.loader.grub.forceInstall = true;
- boot.loader.grub.extraConfig = ''
- serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
- terminal_input serial;
- terminal_output serial
- '';
+ # boot.loader.grub.device = "nodev";
+ boot.loader.grub.device = "boot";
+ boot.loader.timeout = 3;
+ # boot.loader.grub.forceInstall = true;
+ # boot.loader.grub.extraConfig = ''
+ # serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
+ # # serial --speed=115200
+ # terminal_input serial;
+ # terminal_output serial
+ # '';
networking.hostName = "bosco"; # Define your hostname.
@@ -40,7 +45,22 @@
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
- networking.usePredictableInterfaceNames = false;
+ # networking.usePredictableInterfaceNames = false;
+
+ networking.localCommands = ''
+ ip addr add 23.131.76.82/32 eth0
+ '';
+ # networking.interfaces."eth0".ipv4 = {
+ # addresses = [{
+ # address = "23.131.76.82";
+ # prefixLength = 32;
+ # }];
+ # routes = [{
+ # address = "172.16.101.1";
+ # prefixLength = 24;
+ # }];
+ # };
+ # networking.nameservers = "9.9.9.9";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
@@ -78,7 +98,7 @@
services.openssh = {
enable = true;
settings.PermitRootLogin = "no";
- ports = [ 22 2200];
+ ports = [ 22 ];
extraConfig = "LoginGraceTime = 0";
};
@@ -109,7 +129,7 @@
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
- system.stateVersion = "23.11"; # Did you read the comment?
+ system.stateVersion = "25.11"; # Did you read the comment?
}
diff --git a/machines/bosco/disko.nix b/machines/bosco/disko.nix
new file mode 100644
index 0000000..3bb1f85
--- /dev/null
+++ b/machines/bosco/disko.nix
@@ -0,0 +1,64 @@
+{
+ # required by impermanence
+ fileSystems."/persist".neededForBoot = true;
+
+ disko.devices = {
+ disk.sda = {
+ type = "disk";
+ device = "/dev/sda";
+ content = {
+ type = "gpt";
+ partitions = {
+ ESP = {
+ label = "boot";
+ name = "ESP";
+ size = "512M";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ mountOptions = [
+ "defaults"
+ ];
+ };
+ };
+ root = {
+ size = "100%";
+ label = "root";
+ content = {
+ type = "btrfs";
+ extraArgs = [ "-L" "nixos" "-f"];
+ subvolumes = {
+ "@root" = {
+ mountpoint = "/";
+ mountOptions = [ "subvol=root" "compress-force=zstd:5"];
+ };
+ "@home" = {
+ mountpoint = "/home";
+ mountOptions = [ "subvol=home" "compress-force=zstd:5"];
+ };
+ "@nix" = {
+ mountpoint = "/nix";
+ mountOptions = [ "subvol=nix" "compress-force=zstd:5"];
+ };
+ "@persist" = {
+ mountpoint = "/persist";
+ mountOptions = [ "subvol=persist" "compress-force=zstd:5"];
+ };
+ "@log" = {
+ mountpoint = "/var/log";
+ mountOptions = [ "subvol=log" "compress-force=zstd:5"];
+ };
+ "@swap" = {
+ mountpoint = "/swap";
+ swap.swapfile.size = "4G";
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+}