2023-11-06 11:23:58 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2023-11-06 12:01:28 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|