flake/users/guanranwang/home-manager/applications/go/default.nix

22 lines
379 B
Nix
Raw Normal View History

2023-11-06 11:23:58 +00:00
{
pkgs,
config,
...
}: {
programs.go.enable = true;
2023-11-07 05:00:26 +00:00
### LSP
home.packages = with pkgs; [gopls];
### VSCode
programs.vscode.extensions = with pkgs.vscode-extensions; [golang.go];
2023-11-06 11:23:58 +00:00
# Make Go follow XDG
# "$HOME/go"...
xdg.configFile = {
"go/env".text = ''
GOPATH=${config.xdg.cacheHome}/go
GOBIN=${config.xdg.stateHome}/go/bin
'';
};
}