diff --git a/home/nogui/go.nix b/home/nogui/go.nix index 3f5326ce50017a69c454127b6799699c4dada684..527efff0355c41759d59929a897a15178ac4d330 100644 --- a/home/nogui/go.nix +++ b/home/nogui/go.nix @@ -1,3 +1,12 @@ +let + GOPATH = ".local/share/go"; +in { - programs.go.enable = true; + programs.go = { + enable = true; + env = { + inherit GOPATH; + GOBIN = "${GOPATH}/bin"; + }; + }; } diff --git a/home/nogui/nushell/autoload/go-update.nu b/home/nogui/nushell/autoload/go-update.nu deleted file mode 100644 index 783e9a3d40c51fdf56c0d7076c0fb09cf211c585..0000000000000000000000000000000000000000 --- a/home/nogui/nushell/autoload/go-update.nu +++ /dev/null @@ -1,10 +0,0 @@ -module go-update { - # Update to the latest go toolchain - export def --env "go update" [] { - let ver = http get https://go.dev/dl/?mode=json | where stable == true | first | get version - print $"Old: (^go version)" - ^go env -w GOTOOLCHAIN=$"($ver)+auto" - print $"New: (^go version)" - } -} -use go-update *