From 4ca4e45fccdc5d8e3670bdb252fb7ae43b44f394 Mon Sep 17 00:00:00 2001 From: Soispha Date: Thu, 29 Jun 2023 18:14:35 +0200 Subject: Feat(system/disks): Add luks partition --- system/disks/default.nix | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'system') 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; + }; }; }; }; -- cgit 1.4.1