diff --git a/hosts/cloudnix/default.nix b/hosts/cloudnix/default.nix index 13af959..282f435 100644 --- a/hosts/cloudnix/default.nix +++ b/hosts/cloudnix/default.nix @@ -15,6 +15,7 @@ in { ../common/core # Import optional options + ../common/optional/persistence.nix ../common/optional/openssh.nix ../common/optional/distributed-builds/local-machine.nix diff --git a/hosts/common/disks/btrfs/legacy.nix b/hosts/common/disks/btrfs/legacy.nix new file mode 100644 index 0000000..6de397a --- /dev/null +++ b/hosts/common/disks/btrfs/legacy.nix @@ -0,0 +1,59 @@ +{ + disko.devices = { + disk = { + main = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + name = "ESP"; + start = "1M"; + end = "512M"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = ["umask=0077"]; + }; + } + { + name = "root"; + start = "513M"; + end = "100%"; + part-type = "primary"; + bootable = true; + content = { + type = "btrfs"; + extraArgs = ["-f"]; + subvolumes = { + "/root" = { + mountpoint = "/"; + }; + + "/persist" = { + mountOptions = ["subvol=persist"]; + mountpoint = "/persist"; + }; + + "/nix" = { + mountOptions = ["subvol=nix" "noatime"]; + mountpoint = "/nix"; + }; + + "/swap" = { + mountOptions = ["noatime"]; + mountpoint = "/.swapvol"; + }; + }; + }; + } + ]; + }; + }; + }; + }; +}