From 331ba44b751e0151a4bd056fabb3ab2a35323db0 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Mon, 8 Sep 2025 16:24:15 +0200 Subject: [PATCH] sops: Use persisted key path when using impermanence --- modules/system/sops.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/system/sops.nix b/modules/system/sops.nix index 4a471f0..0975fe7 100644 --- a/modules/system/sops.nix +++ b/modules/system/sops.nix @@ -31,7 +31,9 @@ in config = lib.mkIf cfg.enable { sops = { - age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + age.sshKeyPaths = [ + "${lib.optionalString config.custom.impermanence.enable "/persist"}/etc/ssh/ssh_host_ed25519_key" + ]; defaultSopsFile = absoluteSecretsPath; }; };