about summary refs log tree commit diff
path: root/nixos/modules/tasks/encrypted-devices.nix
diff options
context:
space:
mode:
authorWill Fancher <elvishjerricco@gmail.com>2023-04-22 10:39:30 -0400
committerRaito Bezarius <masterancpp@gmail.com>2023-10-30 12:15:58 +0100
commitcca22054c073694e4ca49ca6471be8326d43316b (patch)
tree2dd09922dec1a2d07ae413ac8e7d742ae115e152 /nixos/modules/tasks/encrypted-devices.nix
parentac1dd9de6ce5e3040c49101f21f204744905f418 (diff)
systemd-stage-1: Add assertions for unsupported options.
Diffstat (limited to 'nixos/modules/tasks/encrypted-devices.nix')
-rw-r--r--nixos/modules/tasks/encrypted-devices.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/tasks/encrypted-devices.nix b/nixos/modules/tasks/encrypted-devices.nix
index ab3ccddf682d1..da9c83ba339c2 100644
--- a/nixos/modules/tasks/encrypted-devices.nix
+++ b/nixos/modules/tasks/encrypted-devices.nix
@@ -110,10 +110,11 @@ in
           }) earlyEncDevs);
         forceLuksSupportInInitrd = true;
       };
-      postMountCommands =
-        concatMapStrings (dev:
+      # TODO: systemd stage 1
+      postMountCommands = lib.mkIf (!config.boot.initrd.systemd.enable)
+        (concatMapStrings (dev:
           "cryptsetup luksOpen --key-file ${dev.encrypted.keyFile} ${dev.encrypted.blkDev} ${dev.encrypted.label};\n"
-        ) lateEncDevs;
+        ) lateEncDevs);
     };
   };
 }