diff --git a/nixos/modules/system/boot/systemd/tpm2.nix b/nixos/modules/system/boot/systemd/tpm2.nix index 0870e35212f5..6b6c9fb23f24 100644 --- a/nixos/modules/system/boot/systemd/tpm2.nix +++ b/nixos/modules/system/boot/systemd/tpm2.nix @@ -58,7 +58,7 @@ let cfg = config.boot.initrd.systemd; in - lib.mkIf cfg.tpm2.enable { + lib.mkIf (cfg.enable && cfg.tpm2.enable) { boot.initrd.systemd.additionalUpstreamUnits = [ "tpm2.target" "systemd-tpm2-setup-early.service"