From 7a03cf3dea97edab36c5368d549e4b7da3880fa0 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 3 Nov 2024 18:48:30 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(go):=20Properly=20set=20GOPATH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/programs/go.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/home/programs/go.nix b/home/programs/go.nix index f8b80ab..05c2e72 100644 --- a/home/programs/go.nix +++ b/home/programs/go.nix @@ -2,12 +2,13 @@ { programs.go = { enable = true; - - # Set this explicitly to avoid errors for the sessionPath. - goPath = "go"; }; - home.sessionPath = [ - "${config.programs.go.goPath}" - ]; + home.sessionPath = + let + goPath = config.programs.go.goPath; + in + [ + "${if (goPath == null) then "go" else goPath}" + ]; }