From cff8437c5fe8c68fc3a840a21bf1f4dc801da40d Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Fri, 4 Apr 2025 09:25:24 +0200 Subject: [PATCH] secrets-for-users: set `HOME` envvar to avoid warnings on sops >= 3.10.0 Followup for #765, where I missed this. It's needed here too, since it runs in the same context as the default module. Signed-off-by: Christoph Heiss --- modules/sops/secrets-for-users/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/sops/secrets-for-users/default.nix b/modules/sops/secrets-for-users/default.nix index cca6a15..aee1ced 100644 --- a/modules/sops/secrets-for-users/default.nix +++ b/modules/sops/secrets-for-users/default.nix @@ -14,7 +14,11 @@ let inherit (pkgs) writeTextFile; }; withEnvironment = import ../with-environment.nix { - inherit cfg lib; + # See also the default NixOS module. + cfg = lib.recursiveUpdate cfg { + environment.HOME = "/var/empty"; + }; + inherit lib; }; manifestForUsers = manifestFor "-for-users" secretsForUsers templatesForUsers { secretsMountPoint = "/run/secrets-for-users.d";