about summary refs log tree commit diff
path: root/modules/programs
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-04-04 12:38:26 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-04-04 12:42:31 +0200
commit680c7974330850a54a8a8eafea4922d3bafd79b9 (patch)
tree5badfbf5eb20b1e8b20da57ad7bf07bce3dcf7a0 /modules/programs
parentcf3e6bd29b149bda111d4393109eb4ff6961a13b (diff)
modules/gnupg: Only set GNUPGHOME if non-default
It doesn't make sense to pollute the system with additional environment
variables if we're using the defaults anyway, so only set it if it's not
"~/.gnupg".

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/gnupg/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/programs/gnupg/default.nix b/modules/programs/gnupg/default.nix
index c6034f11..04adcd88 100644
--- a/modules/programs/gnupg/default.nix
+++ b/modules/programs/gnupg/default.nix
@@ -93,6 +93,8 @@ in {
     (mkIf cfg.enable {
       vuizvui.requiresTests = singleton ["vuizvui" "programs" "gnupg"];
       environment.systemPackages = [ cfg.package ];
+    })
+    (mkIf (cfg.enable && cfg.homeDir != ".gnupg") {
       environment.variables.GNUPGHOME = "~/${cfg.homeDir}";
     })
     (mkIf (cfg.enable && cfg.agent.enable) {