From b2211d1a537136cc1d0d5c0af391e8712016b34e Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Fri, 25 Oct 2024 11:50:31 +0800 Subject: [PATCH] fix(home-manager/sops): fix setting unit env The Environment option should be set in Service section. --- modules/home-manager/sops.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home-manager/sops.nix b/modules/home-manager/sops.nix index 72c8c82..768131a 100644 --- a/modules/home-manager/sops.nix +++ b/modules/home-manager/sops.nix @@ -258,9 +258,9 @@ in { }; Service = { Type = "oneshot"; + Environment = builtins.concatStringsSep " " (lib.mapAttrsToList (name: value: "'${name}=${value}'") cfg.environment); ExecStart = script; }; - Environment = cfg.environment; Install.WantedBy = if cfg.gnupg.home != null then [ "graphical-session-pre.target" ] else [ "default.target" ]; };