module: set HOME envvar to avoid warnings on sops >= 3.10.0

Signed-off-by: Christoph Heiss <christoph@c8h4.io>

Update modules/sops/default.nix

Co-authored-by: Dominik Schrempf <dominik.schrempf@gmail.com>
This commit is contained in:
Christoph Heiss 2025-04-03 22:30:35 +02:00 committed by Jörg Thalheim
parent 4521de68fb
commit d3088f783f

View file

@ -34,7 +34,17 @@ let
|| (options.services ? userborn && config.services.userborn.enable);
withEnvironment = import ./with-environment.nix {
inherit cfg lib;
# sops >=3.10.0 now unconditionally searches
# for an SSH key in $HOME/.ssh/, introduced in #1692 [0]. Since in the
# activation script $HOME is never set, it just spits out a slew a
# warnings [1].
#
# [0] https://github.com/Mic92/sops-nix/issues/764
# [1] https://github.com/getsops/sops/pull/1692
cfg = lib.recursiveUpdate cfg {
environment.HOME = "/var/empty";
};
inherit lib;
};
secretType = lib.types.submodule (
{ config, ... }: