From c4e10df754e8e19b754570d5251e15a5559065ae Mon Sep 17 00:00:00 2001 From: Mahyar Mirrashed Date: Wed, 12 Mar 2025 12:48:50 -0700 Subject: [PATCH] fix(nix): set the goroot for tools like jetbrains JetBrains needs to know the GOROOT environment variables. For the sake of other tooling, we will just set these in the flake rather than only in the `.envrc` file. It also keeps all environment configuration localized to our project flake. --- flake.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flake.nix b/flake.nix index db99998f1..198da71fe 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,11 @@ nodePackages.prettier infisical ]; + + env = { + GOROOT = "${pkgs.go}/share/go"; + GOPATH = "$(pwd)/.go"; + }; }; }; }