{ installDisk, ... }: { disko.devices = { disk.main = { type = "disk"; device = installDisk; content = { type = "gpt"; partitions = { BIOS = { size = "1M"; type = "EF02"; }; ESP = { label = "EFI"; size = "512M"; type = "EF00"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = [ "umask=0077" ]; }; }; luks = { label = "cryptroot"; size = "100%"; content = { type = "luks"; name = "cryptroot"; settings = { allowDiscards = true; }; content = { type = "zfs"; pool = "rpool"; }; }; }; }; }; }; zpool.rpool = { type = "zpool"; options = { ashift = "12"; autotrim = "on"; }; rootFsOptions = { acltype = "posixacl"; atime = "off"; compression = "zstd"; dnodesize = "auto"; mountpoint = "none"; normalization = "formD"; xattr = "sa"; }; datasets = { root = { type = "zfs_fs"; options.mountpoint = "none"; }; "root/nixos" = { type = "zfs_fs"; mountpoint = "/"; options = { canmount = "noauto"; mountpoint = "legacy"; }; postCreateHook = '' zfs list -t snapshot -H -o name | grep -E '^rpool/root/nixos@blank$' \ || zfs snapshot rpool/root/nixos@blank ''; }; home = { type = "zfs_fs"; mountpoint = "/home"; options.mountpoint = "legacy"; }; nix = { type = "zfs_fs"; mountpoint = "/nix"; options = { mountpoint = "legacy"; "com.sun:auto-snapshot" = "false"; }; }; persist = { type = "zfs_fs"; mountpoint = "/persist"; options.mountpoint = "legacy"; }; var = { type = "zfs_fs"; options.mountpoint = "none"; }; "var/log" = { type = "zfs_fs"; mountpoint = "/var/log"; options.mountpoint = "legacy"; }; "var/lib" = { type = "zfs_fs"; mountpoint = "/var/lib"; options.mountpoint = "legacy"; }; "var/vmail" = { type = "zfs_fs"; mountpoint = "/var/vmail"; options = { mountpoint = "legacy"; recordsize = "128K"; }; }; reserved = { type = "zfs_volume"; size = "4G"; }; }; }; }; }