diff --git a/nixos/modules/system/boot/systemd/tpm2.nix b/nixos/modules/system/boot/systemd/tpm2.nix index 2703d60428f1..de0f72e5a543 100644 --- a/nixos/modules/system/boot/systemd/tpm2.nix +++ b/nixos/modules/system/boot/systemd/tpm2.nix @@ -43,6 +43,8 @@ "tpm2.target" "systemd-tpm2-setup-early.service" "systemd-tpm2-setup.service" + "systemd-pcrextend.socket" + "systemd-pcrextend@.service" ]; } ) @@ -69,6 +71,8 @@ boot.initrd.systemd.additionalUpstreamUnits = [ "tpm2.target" "systemd-tpm2-setup-early.service" + "systemd-pcrextend.socket" + "systemd-pcrextend@.service" ]; boot.initrd.availableKernelModules = [ @@ -81,6 +85,7 @@ pkgs.tpm2-tss "${cfg.package}/lib/systemd/systemd-tpm2-setup" "${cfg.package}/lib/systemd/system-generators/systemd-tpm2-generator" + "${cfg.package}/lib/systemd/systemd-pcrextend" ]; } ) @@ -89,7 +94,9 @@ cfg = config.boot.initrd.systemd; in lib.mkIf (cfg.enable && cfg.tpm2.enable && cfg.tpm2.pcrphases.enable) { - boot.initrd.systemd.additionalUpstreamUnits = [ "systemd-pcrphase-initrd.service" ]; + boot.initrd.systemd.additionalUpstreamUnits = [ + "systemd-pcrphase-initrd.service" + ]; boot.initrd.systemd.services.systemd-pcrphase-initrd.wantedBy = [ "initrd.target" ]; boot.initrd.systemd.storePaths = [ "${cfg.package}/lib/systemd/systemd-pcrextend" ]; }