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}" + ]; }