From 22e8275ca3f9fa5f7b6c490655cffecbd52f3587 Mon Sep 17 00:00:00 2001 From: dramforever Date: Sun, 1 Feb 2026 13:04:16 +0800 Subject: [PATCH] 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. --- nixos/modules/system/boot/systemd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index af394c17cabd..2d81b1bb3d44 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -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;