diff --git a/nix/.gitignore b/nix/.gitignore new file mode 100644 index 00000000..5a89bf48 --- /dev/null +++ b/nix/.gitignore @@ -0,0 +1,2 @@ +.go/ +.tmp/ diff --git a/shell.nix b/shell.nix index 9a0fd589..696d261b 100644 --- a/shell.nix +++ b/shell.nix @@ -11,11 +11,17 @@ pkgs.mkShell { go_1_19 golint kubectl - kubernetes-controller-tools kubernetes-helm gnumake minikube semver-tool yq-go ]; + shellHook = '' + export GOPATH=$(pwd)/nix/.go + export TMPDIR=$(pwd)/nix/.tmp + export PATH=$GOPATH/bin:$PATH + go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 + mkdir -p "$TMPDIR" + ''; }