mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
33 lines
671 B
Nix
33 lines
671 B
Nix
{ pkgs, config, ... }:
|
|
|
|
{
|
|
programs.go = {
|
|
enable = true;
|
|
env = {
|
|
GOPATH = [
|
|
"${config.home.homeDirectory}/mygo"
|
|
"/another/go"
|
|
"/yet/another/go"
|
|
];
|
|
GOPRIVATE = [
|
|
"*.corp.example.com"
|
|
"rsc.io/private"
|
|
];
|
|
CXX = "g++";
|
|
GCCGO = "gccgo";
|
|
GOAMD64 = "v1";
|
|
GOARCH = "amd64";
|
|
GOAUTH = "netrc";
|
|
};
|
|
};
|
|
|
|
nmt.script =
|
|
let
|
|
goCfgDir = if !pkgs.stdenv.isDarwin then ".config/go" else "Library/Application Support/go";
|
|
in
|
|
''
|
|
assertFileExists "home-files/${goCfgDir}/env"
|
|
assertFileContent "home-files/${goCfgDir}/env" \
|
|
${./env}
|
|
'';
|
|
}
|