{ config, ... }: { disko.devices = { disk = { main = { type = "disk"; device = config.snowflake.hardware.diskDevice; content = { type = "gpt"; partitions = { boot = { name = "boot"; size = "1M"; type = "EF02"; }; esp = { name = "ESP"; size = "512M"; type = "EF00"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = [ "defaults" ]; }; }; luks = { size = "100%"; label = "luks"; content = { type = "luks"; name = "cryptroot"; # passwordFile = "/tmp/secret.key"; # Interactive; you can use this directive to automate the process. Populate using: `echo "password" >/tmp/secret.key` on the remote machine settings = { allowDiscards = true; }; # additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; content = { type = "btrfs"; extraArgs = [ "-L" "nixos" "-f" ]; subvolumes = { "@" = { mountpoint = "/"; mountOptions = [ "ssd" "noatime" "compress=zstd:1" "space_cache=v2" "subvol=@" ]; }; "@home" = { mountpoint = "/home"; mountOptions = [ "ssd" "noatime" "compress=zstd:1" "space_cache=v2" "subvol=@home" ]; }; "@nix" = { mountpoint = "/nix"; mountOptions = [ "ssd" "noatime" "compress=zstd:1" "space_cache=v2" "subvol=@nix" ]; }; }; }; }; }; }; }; }; }; }; }