let installDisk = "sda"; bootPartitionSize = "512M"; swapfileSize = "10G"; in { disko.devices = { disk = { main = { type = "disk"; device = "/dev/" + installDisk; content = { type = "gpt"; partitions = { boot = { size = "1M"; type = "EF02"; # for grub MBR }; ESP = { size = bootPartitionSize; type = "EF00"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = [ "defaults" ]; }; }; luks = { size = "100%"; content = { type = "luks"; name = "cryptroot"; settings.allowDiscards = true; content = { type = "btrfs"; extraArgs = [ "-f" ]; subvolumes = { "@root" = { mountpoint = "/"; mountOptions = [ "compress=zstd" "noatime" ]; }; "@home" = { mountpoint = "/home"; mountOptions = [ "compress=zstd" "noatime" ]; }; "@games" = { mountpoint = "/games"; mountOptions = [ "compress=zstd" "noatime" ]; }; "@nix" = { mountpoint = "/nix"; mountOptions = [ "compress=zstd" "noatime" ]; }; "@log" = { mountpoint = "/var/log"; mountOptions = [ "compress=zstd" "noatime" ]; }; "@swap" = { mountpoint = "/swap"; swap.swapfile.size = swapfileSize; }; "@.snapshots" = { mountpoint = "/.snapshots"; mountOptions = [ "compress=zstd" "noatime" ]; }; }; }; }; }; }; }; }; }; }; }