diff options
Diffstat (limited to 'hosts/skadhi/hw.nix')
| -rw-r--r-- | hosts/skadhi/hw.nix | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/hosts/skadhi/hw.nix b/hosts/skadhi/hw.nix index 0eb16b7a..02fb5c0e 100644 --- a/hosts/skadhi/hw.nix +++ b/hosts/skadhi/hw.nix | |||
| @@ -16,64 +16,5 @@ | |||
| 16 | ''; | 16 | ''; |
| 17 | 17 | ||
| 18 | nixpkgs.system = "x86_64-linux"; | 18 | nixpkgs.system = "x86_64-linux"; |
| 19 | |||
| 20 | disko.devices = { | ||
| 21 | disk.nvm = { | ||
| 22 | type = "disk"; | ||
| 23 | device = "/dev/nvme0n1"; | ||
| 24 | content = { | ||
| 25 | type = "gpt"; | ||
| 26 | partitions = { | ||
| 27 | ESP = { | ||
| 28 | size = "512M"; | ||
| 29 | type = "EF00"; | ||
| 30 | content = { | ||
| 31 | type = "filesystem"; | ||
| 32 | format = "vfat"; | ||
| 33 | mountpoint = "/boot"; | ||
| 34 | mountOptions = [ | ||
| 35 | "fmask=0033" "dmask=0022" | ||
| 36 | ]; | ||
| 37 | }; | ||
| 38 | }; | ||
| 39 | luks = { | ||
| 40 | size = "100%"; | ||
| 41 | content = { | ||
| 42 | type = "luks"; | ||
| 43 | name = "nvm"; | ||
| 44 | extraFormatArgs = [ | ||
| 45 | "--cipher" "aegis128-random" | ||
| 46 | "--key-size" "128" | ||
| 47 | "--integrity" "aead" | ||
| 48 | ]; | ||
| 49 | content = { | ||
| 50 | type = "btrfs"; | ||
| 51 | extraArgs = let | ||
| 52 | subvols = ["/persistent"] ++ map (p: "/persistent/${p}") ["/nix" "/var/log"]; | ||
| 53 | restricted = map (p: "/persistent/${p}") ["/root"]; | ||
| 54 | in [ | ||
| 55 | "--csum" "blake2" | ||
| 56 | "--compress" "zstd:15" | ||
| 57 | "--rootdir" (toString (pkgs.runCommand "rootdir" { | ||
| 58 | } '' | ||
| 59 | mkdir $out | ||
| 60 | install -d ${lib.concatMapStringsSep " " (p: "$out/${p}") subvols} | ||
| 61 | install -m 0700 -d ${lib.concatMapStringsSep " " (p: "$out/${p}") restricted} | ||
| 62 | '')) | ||
| 63 | ] ++ lib.concatMap (p: ["--subvol" p]) subvols; | ||
| 64 | subvolumes = { | ||
| 65 | "/persistent".mountpoint = "/persistent"; | ||
| 66 | "/swap" = { | ||
| 67 | mountpoint = "/.swap"; | ||
| 68 | swap.swapfile.size = "96G"; | ||
| 69 | }; | ||
| 70 | }; | ||
| 71 | }; | ||
| 72 | }; | ||
| 73 | }; | ||
| 74 | }; | ||
| 75 | }; | ||
| 76 | }; | ||
| 77 | }; | ||
| 78 | }; | 19 | }; |
| 79 | } | 20 | } |
