diff --git a/disco.nix b/disco.nix deleted file mode 100644 index c5ccae5..0000000 --- a/disco.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ disks ? [ "/dev/nvme0n1" ], ... }: - -{ - disk = { - device = builtins.elemAt disks 0; - type = "disk"; - content = { - type = "gpt"; - partitions = [ - { name = "ESP"; type = "EF00"; size = "512M"; content.type = "filesystem"; - content.format = "fat32"; mountpoint = "/boot"; } - { name = "rpool"; type = "BE00"; size = "60G"; - content.type = "zfs"; content.pool = "rpool"; } - { name = "tank"; type = "BE00"; - content.type = "zfs"; content.pool = "tank"; } - ]; - }; - }; - - zpool = { - rpool = { datasets = { root = { mountpoint = "/"; }; }; }; - tank = { datasets = { media = { mountpoint = "/tank"; }; }; }; - }; -} - diff --git a/disko.nix b/disko.nix new file mode 100644 index 0000000..eb96ccd --- /dev/null +++ b/disko.nix @@ -0,0 +1,56 @@ +# disko.nix – Root-on-ZFS (rpool) + Datenpool (tank) +{ disks ? [ "/dev/nvme0n1" ], lib, ... }: + +{ + disko.devices = { + disk.main = { + device = builtins.elemAt disks 0; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "fat32"; + mountpoint = "/boot"; + }; + }; + rpool = { + size = "60G"; + type = "BE00"; + content = { + type = "zfs"; + pool = "rpool"; + }; + }; + tank = { + type = "BE00"; + content = { + type = "zfs"; + pool = "tank"; + }; + }; + }; + }; + }; + + zpool.rpool = { + datasets = { + root = { mountpoint = "/"; }; + nix = { mountpoint = "/nix"; }; + home = { mountpoint = "/home"; }; + }; + rootFs = "root"; + }; + + zpool.tank = { + datasets = { + media = { mountpoint = "/tank"; }; + }; + }; + }; +} + diff --git a/flake.nix b/flake.nix index a2f9853..c54c9d6 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ modules = [ ./hardware/hardware-configuration.nix # generiertes hardware-configuration.nix ./configuration.nix # deine eigentliche Config - ./disco.nix # disco partitionierung + ./disko.nix # disko partitionierung nixos-hardware.nixosModules.common-pc-ssd ]; };