nixos/systemd/tpm2: add systemd-pcrlogin@.service

systemd v261 added systemd-pcrlogin@.service, which logind starts on
first login of a user to measure the user record into the 'login'
NvPCR. NixOS does not install the unit, so every first login logs:

  systemd-logind: Failed to start user measurement service
  'systemd-pcrlogin@1000.service', ignoring: Unit not found.

Install the unit on systems with systemd.tpm2.enable. The unit has ConditionSecurity=measured-os and does nothing elsewhere.
This commit is contained in:
r-vdp
2026-07-13 12:35:00 +02:00
parent 82b73060c5
commit 74abe2fea2
@@ -45,6 +45,7 @@
"systemd-tpm2-setup.service"
"systemd-pcrextend.socket"
"systemd-pcrextend@.service"
"systemd-pcrlogin@.service"
];
}
)