flake/home/applications/go/default.nix

24 lines
445 B
Nix
Raw Normal View History

2023-11-06 11:23:58 +00:00
{
pkgs,
config,
...
}: {
programs.go.enable = true;
2023-12-29 02:49:00 +00:00
home.packages = with pkgs; [
gopls # lsp
delve # debugger
go-tools # linter and static analysis
];
2023-11-07 05:00:26 +00:00
### 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
'';
};
}