mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 19:49:45 +01:00
go: use attribute set to define files
To avoid warning message concerning deprecation of the `loaOf` type.
This commit is contained in:
parent
8ace1ab1b0
commit
e857249d86
1 changed files with 4 additions and 6 deletions
|
@ -77,14 +77,11 @@ in
|
||||||
home.file =
|
home.file =
|
||||||
let
|
let
|
||||||
goPath = if cfg.goPath != null then cfg.goPath else "go";
|
goPath = if cfg.goPath != null then cfg.goPath else "go";
|
||||||
|
mkSrc = n: v: { "${goPath}/src/${n}".source = v; };
|
||||||
mkSrc = n: v: {
|
|
||||||
target = "${goPath}/src/${n}";
|
|
||||||
source = v;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
mapAttrsToList mkSrc cfg.packages;
|
foldl' (a: b: a // b) {} (mapAttrsToList mkSrc cfg.packages);
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf (cfg.goPath != null) {
|
(mkIf (cfg.goPath != null) {
|
||||||
home.sessionVariables.GOPATH =
|
home.sessionVariables.GOPATH =
|
||||||
concatStringsSep ":"
|
concatStringsSep ":"
|
||||||
|
@ -92,6 +89,7 @@ in
|
||||||
(map (path: "${config.home.homeDirectory}/${path}")
|
(map (path: "${config.home.homeDirectory}/${path}")
|
||||||
([cfg.goPath] ++ cfg.extraGoPaths)));
|
([cfg.goPath] ++ cfg.extraGoPaths)));
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf (cfg.goBin != null) {
|
(mkIf (cfg.goBin != null) {
|
||||||
home.sessionVariables.GOBIN = builtins.toPath "${config.home.homeDirectory}/${cfg.goBin}";
|
home.sessionVariables.GOBIN = builtins.toPath "${config.home.homeDirectory}/${cfg.goBin}";
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue