nixos/systemd/tpm2/pcrextend: add pcrosseperator

Add new pcrosseperator.service introduced in systemd v261
This commit is contained in:
Plopmenz
2026-09-28 21:42:18 +02:00
parent ab571fccdd
commit cd44b4f188

View File

@@ -29,6 +29,9 @@
boot.initrd.systemd.tpm2.pcrphases.enable =
lib.mkEnableOption "systemd initrd boot phase measurements";
boot.initrd.systemd.tpm2.pcrosseparator.enable =
lib.mkEnableOption "systemd initrd boot phase OS userspace separator";
};
# TODO: pcrextend, pcrfs, pcrmachine
@@ -101,5 +104,17 @@
boot.initrd.systemd.storePaths = [ "${cfg.package}/lib/systemd/systemd-pcrextend" ];
}
)
(
let
cfg = config.boot.initrd.systemd;
in
lib.mkIf (cfg.enable && cfg.tpm2.enable && cfg.tpm2.pcrosseparator.enable) {
boot.initrd.systemd.additionalUpstreamUnits = [
"systemd-pcrosseparator.service"
];
boot.initrd.systemd.services.systemd-pcrosseparator.wantedBy = [ "initrd.target" ];
boot.initrd.systemd.storePaths = [ "${cfg.package}/lib/systemd/systemd-pcrextend" ];
}
)
];
}