mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
nixos/systemd: only use cryptsetup units if systemd was built with it
This commit is contained in:
parent
c07b471b52
commit
4b27d4f9f8
@ -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"
|
||||
|
@ -596,16 +596,20 @@ stdenv.mkDerivation {
|
||||
rm -rf $out/share/doc
|
||||
'';
|
||||
|
||||
# The interface version prevents NixOS from switching to an
|
||||
# incompatible systemd at runtime. (Switching across reboots is
|
||||
# fine, of course.) It should be increased whenever systemd changes
|
||||
# in a backwards-incompatible way. If the interface version of two
|
||||
# systemd builds is the same, then we can switch between them at
|
||||
# runtime; otherwise we can't and we need to reboot.
|
||||
passthru.interfaceVersion = 2;
|
||||
passthru = {
|
||||
# The interface version prevents NixOS from switching to an
|
||||
# incompatible systemd at runtime. (Switching across reboots is
|
||||
# fine, of course.) It should be increased whenever systemd changes
|
||||
# in a backwards-incompatible way. If the interface version of two
|
||||
# systemd builds is the same, then we can switch between them at
|
||||
# runtime; otherwise we can't and we need to reboot.
|
||||
interfaceVersion = 2;
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) switchTest;
|
||||
inherit withCryptsetup;
|
||||
|
||||
tests = {
|
||||
inherit (nixosTests) switchTest;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user