nixos/systemd: Use systemd-tpm2-clear.service only if withTpm2Units

Move systemd-tpm2-clear.service so that it's conditional on
withTpm2Units. Fixes generateUnits build on MIPS.
This commit is contained in:
dramforever
2026-02-01 13:04:16 +08:00
parent d5a1be3073
commit 22e8275ca3

View File

@@ -167,6 +167,7 @@ let
++ lib.optionals cfg.package.withTpm2Units [
"systemd-pcrlock@.service"
"systemd-pcrlock.socket"
"systemd-tpm2-clear.service"
]
++ [
@@ -218,7 +219,6 @@ let
"factory-reset.target"
"systemd-factory-reset-request.service"
"systemd-factory-reset-reboot.service"
"systemd-tpm2-clear.service"
]
++ cfg.additionalUpstreamSystemUnits;