add legacy disk config and add persistence back to cloudnix

This commit is contained in:
Sam 2025-01-25 17:55:52 +00:00
parent dd66a73f24
commit 620db0fb22
2 changed files with 60 additions and 0 deletions

View File

@ -15,6 +15,7 @@ in {
../common/core ../common/core
# Import optional options # Import optional options
../common/optional/persistence.nix
../common/optional/openssh.nix ../common/optional/openssh.nix
../common/optional/distributed-builds/local-machine.nix ../common/optional/distributed-builds/local-machine.nix

View File

@ -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";
};
};
};
}
];
};
};
};
};
}