summary refs log tree commit diff
path: root/nixos/modules/system/boot/systemd.nix
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2022-01-23 11:58:30 +0100
committerLinus Heckemann <git@sphalerite.org>2022-01-30 12:00:37 +0100
commit4b27d4f9f8f5396d0d6688d567568241e8bc34f9 (patch)
treed512967ee5a9293fd786b3ada08a63c091c6371f /nixos/modules/system/boot/systemd.nix
parentc07b471b52be8fbc49a7dc194e9b37a6e19ee04d (diff)
downloadnixpkgs-4b27d4f9f8f5396d0d6688d567568241e8bc34f9.tar
nixpkgs-4b27d4f9f8f5396d0d6688d567568241e8bc34f9.tar.gz
nixpkgs-4b27d4f9f8f5396d0d6688d567568241e8bc34f9.tar.bz2
nixpkgs-4b27d4f9f8f5396d0d6688d567568241e8bc34f9.tar.lz
nixpkgs-4b27d4f9f8f5396d0d6688d567568241e8bc34f9.tar.xz
nixpkgs-4b27d4f9f8f5396d0d6688d567568241e8bc34f9.tar.zst
nixpkgs-4b27d4f9f8f5396d0d6688d567568241e8bc34f9.zip
nixos/systemd: only use cryptsetup units if systemd was built with it
Diffstat (limited to 'nixos/modules/system/boot/systemd.nix')
-rw-r--r--nixos/modules/system/boot/systemd.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index ec5dea075bb..c52a834ac77 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -25,9 +25,11 @@ let
       "nss-lookup.target"
       "nss-user-lookup.target"
       "time-sync.target"
+    ] ++ (optionals cfg.package.withCryptsetup [
       "cryptsetup.target"
       "cryptsetup-pre.target"
       "remote-cryptsetup.target"
+    ]) ++ [
       "sigpwr.target"
       "timers.target"
       "paths.target"