From 680c7974330850a54a8a8eafea4922d3bafd79b9 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 4 Apr 2016 12:38:26 +0200 Subject: 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 --- modules/programs/gnupg/default.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules') 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) { -- cgit 1.4.1