diff --git a/disko.nix b/disko.nix index ace68af..079927d 100644 --- a/disko.nix +++ b/disko.nix @@ -1,4 +1,4 @@ -# disko.nix – Root-on-ZFS (rpool) + Datenpool (tank) +# disko.nix – Root-on-ZFS (rpool) + Daten-Pool (tank) { disks, ... }: { @@ -6,12 +6,12 @@ disk.main = { device = builtins.elemAt disks 0; type = "disk"; + content = { type = "gpt"; partitions = { ESP = { - size = "512M"; - type = "EF00"; + size = "512M"; type = "EF00"; content = { type = "filesystem"; format = "fat32"; @@ -19,36 +19,46 @@ }; }; rpool = { - size = "60G"; - type = "BE00"; - content = { - type = "zfs"; - pool = "rpool"; - }; + size = "60G"; type = "BF00"; + content = { type = "zfs"; pool = "rpool"; }; }; tank = { - type = "BE00"; - content = { - type = "zfs"; - pool = "tank"; - }; + type = "BF00"; + content = { type = "zfs"; pool = "tank"; }; }; }; }; }; zpool.rpool = { + type = "zpool"; + options = { ashift = "12"; autotrim = "on"; }; datasets = { - root = { mountpoint = "/"; }; - nix = { mountpoint = "/nix"; }; - home = { mountpoint = "/home"; }; + root = { + type = "zfs_fs"; + mountpoint = "/"; + options.compression = "zstd"; + }; + nix = { + type = "zfs_fs"; + mountpoint = "/nix"; + options.compression = "zstd"; + }; + home = { + type = "zfs_fs"; + mountpoint = "/home"; + options.compression = "zstd"; + }; }; - rootFs = "root"; }; zpool.tank = { - datasets = { - media = { mountpoint = "/tank"; }; + type = "zpool"; + options = { ashift = "12"; autotrim = "on"; }; + datasets.media = { + type = "zfs_fs"; + mountpoint = "/tank"; + options.compression = "zstd"; }; }; };