mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
Merge pull request #157053 from lheckemann/systemd-optional-cryptsetup
nixos/systemd: only use cryptsetup units if systemd was built with it
This commit is contained in:
commit
0d5c5e46da
2 changed files with 15 additions and 9 deletions
|
@ -25,9 +25,11 @@ let
|
||||||
"nss-lookup.target"
|
"nss-lookup.target"
|
||||||
"nss-user-lookup.target"
|
"nss-user-lookup.target"
|
||||||
"time-sync.target"
|
"time-sync.target"
|
||||||
|
] ++ (optionals cfg.package.withCryptsetup [
|
||||||
"cryptsetup.target"
|
"cryptsetup.target"
|
||||||
"cryptsetup-pre.target"
|
"cryptsetup-pre.target"
|
||||||
"remote-cryptsetup.target"
|
"remote-cryptsetup.target"
|
||||||
|
]) ++ [
|
||||||
"sigpwr.target"
|
"sigpwr.target"
|
||||||
"timers.target"
|
"timers.target"
|
||||||
"paths.target"
|
"paths.target"
|
||||||
|
|
|
@ -594,16 +594,20 @@ stdenv.mkDerivation {
|
||||||
rm -rf $out/share/doc
|
rm -rf $out/share/doc
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# The interface version prevents NixOS from switching to an
|
passthru = {
|
||||||
# incompatible systemd at runtime. (Switching across reboots is
|
# The interface version prevents NixOS from switching to an
|
||||||
# fine, of course.) It should be increased whenever systemd changes
|
# incompatible systemd at runtime. (Switching across reboots is
|
||||||
# in a backwards-incompatible way. If the interface version of two
|
# fine, of course.) It should be increased whenever systemd changes
|
||||||
# systemd builds is the same, then we can switch between them at
|
# in a backwards-incompatible way. If the interface version of two
|
||||||
# runtime; otherwise we can't and we need to reboot.
|
# systemd builds is the same, then we can switch between them at
|
||||||
passthru.interfaceVersion = 2;
|
# runtime; otherwise we can't and we need to reboot.
|
||||||
|
interfaceVersion = 2;
|
||||||
|
|
||||||
passthru.tests = {
|
inherit withCryptsetup;
|
||||||
inherit (nixosTests) switchTest;
|
|
||||||
|
tests = {
|
||||||
|
inherit (nixosTests) switchTest;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue