mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-01 12:20:10 +00:00
nixos/systemd/tpm2/pcrextend: add pcrosseperator
Add new pcrosseperator.service introduced in systemd v261
This commit is contained in:
@@ -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" ];
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user