From 36bbaff2a2bd32576881b305a46cb5a6838543a3 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Sun, 24 Sep 2023 11:26:30 +0200 Subject: [PATCH] pinwheel: Use `go 1.21` And change `$GOPATH` --- hosts/pinwheel/modules/go/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hosts/pinwheel/modules/go/default.nix b/hosts/pinwheel/modules/go/default.nix index a94e70a..9f475cb 100644 --- a/hosts/pinwheel/modules/go/default.nix +++ b/hosts/pinwheel/modules/go/default.nix @@ -1,8 +1,19 @@ { pkgs, ... }: { home-manager.users.alex = { - home.packages = [ pkgs.gopls ]; - }; + programs.go = { + enable = true; - environment.systemPackages = [ pkgs.go ]; + package = pkgs.go_1_21; + goPath = "code/go"; + }; + + home.packages = [ pkgs.gopls ]; + + programs.zsh = { + envExtra = '' + PATH=$PATH:/home/alex/code/go/bin + ''; + }; + }; }