diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 3096517c0b08..3b4bdaae071e 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -104,7 +104,7 @@ let "sleep.target" "hybrid-sleep.target" "systemd-hibernate.service" - "systemd-hibernate-clear.service" + ] ++ (lib.optional cfg.package.withEfi "systemd-hibernate-clear.service") ++ [ "systemd-hybrid-sleep.service" "systemd-suspend.service" "systemd-suspend-then-hibernate.service" @@ -130,11 +130,13 @@ let "systemd-ask-password-wall.service" # Varlink APIs + ] ++ lib.optionals cfg.package.withBootloader [ "systemd-bootctl@.service" "systemd-bootctl.socket" + ] ++ [ "systemd-creds@.service" "systemd-creds.socket" - ] ++ lib.optional cfg.package.withTpm2Tss [ + ] ++ lib.optional cfg.package.withTpm2Units [ "systemd-pcrlock@.service" "systemd-pcrlock.socket" ] ++ [ diff --git a/nixos/modules/system/boot/systemd/tpm2.nix b/nixos/modules/system/boot/systemd/tpm2.nix index 6b6c9fb23f24..8bf3b8413574 100644 --- a/nixos/modules/system/boot/systemd/tpm2.nix +++ b/nixos/modules/system/boot/systemd/tpm2.nix @@ -27,13 +27,13 @@ options = { systemd.tpm2.enable = lib.mkEnableOption "systemd TPM2 support" // { - default = config.systemd.package.withTpm2Tss; - defaultText = "systemd.package.withTpm2Tss"; + default = config.systemd.package.withTpm2Units; + defaultText = "systemd.package.withTpm2Units"; }; boot.initrd.systemd.tpm2.enable = lib.mkEnableOption "systemd initrd TPM2 support" // { - default = config.boot.initrd.systemd.package.withTpm2Tss; - defaultText = "boot.initrd.systemd.package.withTpm2Tss"; + default = config.boot.initrd.systemd.package.withTpm2Units; + defaultText = "boot.initrd.systemd.package.withTpm2Units"; }; };