nixos/systemd: conditionally leave out some upstream units
Some upstream systemd units are conditionally installed into the systemd output, so we must make sure the feature that enables their installation is enabled on our side prior to trying to use them.
This commit is contained in:
@@ -104,7 +104,7 @@ let
|
|||||||
"sleep.target"
|
"sleep.target"
|
||||||
"hybrid-sleep.target"
|
"hybrid-sleep.target"
|
||||||
"systemd-hibernate.service"
|
"systemd-hibernate.service"
|
||||||
"systemd-hibernate-clear.service"
|
] ++ (lib.optional cfg.package.withEfi "systemd-hibernate-clear.service") ++ [
|
||||||
"systemd-hybrid-sleep.service"
|
"systemd-hybrid-sleep.service"
|
||||||
"systemd-suspend.service"
|
"systemd-suspend.service"
|
||||||
"systemd-suspend-then-hibernate.service"
|
"systemd-suspend-then-hibernate.service"
|
||||||
@@ -130,11 +130,13 @@ let
|
|||||||
"systemd-ask-password-wall.service"
|
"systemd-ask-password-wall.service"
|
||||||
|
|
||||||
# Varlink APIs
|
# Varlink APIs
|
||||||
|
] ++ lib.optionals cfg.package.withBootloader [
|
||||||
"systemd-bootctl@.service"
|
"systemd-bootctl@.service"
|
||||||
"systemd-bootctl.socket"
|
"systemd-bootctl.socket"
|
||||||
|
] ++ [
|
||||||
"systemd-creds@.service"
|
"systemd-creds@.service"
|
||||||
"systemd-creds.socket"
|
"systemd-creds.socket"
|
||||||
] ++ lib.optional cfg.package.withTpm2Tss [
|
] ++ lib.optional cfg.package.withTpm2Units [
|
||||||
"systemd-pcrlock@.service"
|
"systemd-pcrlock@.service"
|
||||||
"systemd-pcrlock.socket"
|
"systemd-pcrlock.socket"
|
||||||
] ++ [
|
] ++ [
|
||||||
|
|||||||
@@ -27,13 +27,13 @@
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
systemd.tpm2.enable = lib.mkEnableOption "systemd TPM2 support" // {
|
systemd.tpm2.enable = lib.mkEnableOption "systemd TPM2 support" // {
|
||||||
default = config.systemd.package.withTpm2Tss;
|
default = config.systemd.package.withTpm2Units;
|
||||||
defaultText = "systemd.package.withTpm2Tss";
|
defaultText = "systemd.package.withTpm2Units";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.systemd.tpm2.enable = lib.mkEnableOption "systemd initrd TPM2 support" // {
|
boot.initrd.systemd.tpm2.enable = lib.mkEnableOption "systemd initrd TPM2 support" // {
|
||||||
default = config.boot.initrd.systemd.package.withTpm2Tss;
|
default = config.boot.initrd.systemd.package.withTpm2Units;
|
||||||
defaultText = "boot.initrd.systemd.package.withTpm2Tss";
|
defaultText = "boot.initrd.systemd.package.withTpm2Units";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user