From 41034167742a5c180bccdaf304c481d0a76ddac0 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Wed, 9 Jul 2025 18:40:37 +0200 Subject: [PATCH] Modules/Sops: Set SOPS_AGE_KEY_FILE for "sops edit secrets.yaml" --- system/modules/sops-nix/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/modules/sops-nix/default.nix b/system/modules/sops-nix/default.nix index cb500816..37c07cc9 100644 --- a/system/modules/sops-nix/default.nix +++ b/system/modules/sops-nix/default.nix @@ -17,6 +17,11 @@ in { ssh-to-age ]; + environment.variables = { + # Set this environment variable to make "sops edit secrets.yaml" work + SOPS_AGE_KEY_FILE = config.sops.age.keyFile; + }; + sops = { defaultSopsFile = ./secrets.yaml;