aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/go.nix
diff options
context:
space:
mode:
authorKaiden Fey <kookie@spacekookie.de>2020-09-21 14:12:32 +0200
committerKatharina Fey <kookie@spacekookie.de>2020-09-21 14:12:32 +0200
commitf80843dd45d7acd563d0a5b014cec3a2ea686fc2 (patch)
tree87189d873d6f932d85f9c1a480462b37d96cd6a5 /home-manager/modules/programs/go.nix
parente0800985dab8f8ebb4cebdfd7e361fd1fafdb2a7 (diff)
parent9b1b55ba0264a55add4b7b4e022bdc2832b531f6 (diff)
Merge commit '9b1b55ba0264a55add4b7b4e022bdc2832b531f6'
Diffstat (limited to 'home-manager/modules/programs/go.nix')
-rw-r--r--home-manager/modules/programs/go.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/home-manager/modules/programs/go.nix b/home-manager/modules/programs/go.nix
index 983769d26af..4b85ec854ad 100644
--- a/home-manager/modules/programs/go.nix
+++ b/home-manager/modules/programs/go.nix
@@ -62,6 +62,18 @@ in {
example = ".local/bin.go";
description = "GOBIN relative to HOME";
};
+
+ goPrivate = mkOption {
+ type = with types; listOf str;
+ default = [ ];
+ example = [ "*.corp.example.com" "rsc.io/private" ];
+ description = ''
+ The <envar>GOPRIVATE</envar> environment variable controls
+ which modules the go command considers to be private (not
+ available publicly) and should therefore not use the proxy
+ or checksum database.
+ '';
+ };
};
};
@@ -85,5 +97,9 @@ in {
home.sessionVariables.GOBIN =
builtins.toPath "${config.home.homeDirectory}/${cfg.goBin}";
})
+
+ (mkIf (cfg.goPrivate != [ ]) {
+ home.sessionVariables.GOPRIVATE = concatStringsSep "," cfg.goPrivate;
+ })
]);
}