diff options
author | Soispha <soispha@vhack.eu> | 2023-06-29 18:14:35 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-10 16:44:11 +0200 |
commit | 4ca4e45fccdc5d8e3670bdb252fb7ae43b44f394 (patch) | |
tree | a72d93563b9b86dcdd2605f262cae57f3fcc7de1 /system | |
parent | Fix(system/disks): Use correct option name (diff) | |
download | nixos-config-4ca4e45fccdc5d8e3670bdb252fb7ae43b44f394.tar.gz nixos-config-4ca4e45fccdc5d8e3670bdb252fb7ae43b44f394.zip |
Feat(system/disks): Add luks partition
Diffstat (limited to '')
-rw-r--r-- | system/disks/default.nix | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/system/disks/default.nix b/system/disks/default.nix index a560af4a..29b7d3cb 100644 --- a/system/disks/default.nix +++ b/system/disks/default.nix @@ -51,20 +51,25 @@ in { size = "100%"; name = "root"; content = { - type = "btrfs"; - extraArgs = ["-f"]; # Override existing partitions - subvolumes = { - "nix" = { - mountpoint = "/nix"; - mountOptions = defaultMountOptions; - }; - "persistent-storage" = { - mountpoint = "/srv"; - mountOptions = defaultMountOptions; - }; - "swap" = { - mountpoint = "/swap"; - mountOptions = defaultMountOptions; + type = "luks"; + name = "encrypted"; + extraOpenArgs = ["--allow-discards"]; + content = { + type = "btrfs"; + extraArgs = ["-f"]; # Override existing partitions + subvolumes = { + "nix" = { + mountpoint = "/nix"; + mountOptions = defaultMountOptions; + }; + "persistent-storage" = { + mountpoint = "/srv"; + mountOptions = defaultMountOptions; + }; + "swap" = { + mountpoint = "/swap"; + mountOptions = defaultMountOptions; + }; }; }; }; |