diff --git a/devices/ellaca/disko.nix b/devices/ellaca/disko.nix new file mode 100644 index 0000000..a74ea4a --- /dev/null +++ b/devices/ellaca/disko.nix @@ -0,0 +1,107 @@ +{ + disko.devices = { + disk = { + ssd1 = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + efi = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + crypt = { + size = "100%"; + content = { + type = "luks"; + name = "crypt"; + passwordFile = "/tmp/secret.key"; + settings = { + allowDiscards = true; + }; + content = { + type = "zfs"; + pool = "zroot"; + }; + }; + }; + }; + }; + }; + hdd1 = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + crypt = { + size = "100%"; + content = { + type = "luks"; + name = "crypt"; + passwordFile = "/tmp/secret.key"; + settings = { + allowDiscards = true; + }; + content = { + type = "zfs"; + pool = "zstore"; + }; + }; + }; + }; + }; + }; + zpool = { + zroot = { + type = "zpool"; + mode = ""; + rootFsOptions = { + compression = "zstd"; + canmount = "off"; + "com.sun:auto-snapshot" = "false"; + }; + postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank"; + + datasets = { + root = { + type = "zfs_fs"; + mountpoint = "/"; + }; + nix = { + type = "zfs_fs"; + mountpoint = "/nix"; + }; + persist = { + type = "zfs_fs"; + mountpoint = "/persist"; + }; + }; + }; + zstore = { + type = "zpool"; + mode = ""; + rootFsOptions = { + compression = "zstd"; + canmount = "off"; + "com.sun:auto-snapshot" = "false"; + }; + postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank"; + + datasets = { + persist = { + type = "zfs_fs"; + mountpoint = "/persist/ext"; + }; + }; + }; + }; + }; + }; +}