From 83ae12e0806e53caa17422cd965308add393c234 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 29 Oct 2024 18:00:00 +0000 Subject: [PATCH] Add built Go binaries to $PATH --- home/opdavies/default.nix | 9 ++++++++- lib/wsl2/default.nix | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/home/opdavies/default.nix b/home/opdavies/default.nix index 2279313..67eefa1 100644 --- a/home/opdavies/default.nix +++ b/home/opdavies/default.nix @@ -8,6 +8,8 @@ ... }: let + inherit (pkgs) lib; + desktop-config = import ./desktop.nix { inherit config @@ -75,7 +77,12 @@ in LANG = "en_GB.UTF-8"; LC_ALL = "en_GB.UTF-8"; LC_CTYPE = "en_GB.UTF-8"; - PATH = "$PATH:./vendor/bin:./node_modules/.bin"; + PATH = lib.concatStringsSep ":" [ + "$PATH" + "$HOME/go/bin" + "./vendor/bin" + "./node_modules/.bin" + ]; PULUMI_SKIP_UPDATE_CHECK = "true"; REPOS = "$HOME/Code"; RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config"; diff --git a/lib/wsl2/default.nix b/lib/wsl2/default.nix index 02bb6e9..ba93081 100644 --- a/lib/wsl2/default.nix +++ b/lib/wsl2/default.nix @@ -6,6 +6,8 @@ { system }: let + inherit (pkgs) lib; + pkgs = inputs.nixpkgs.legacyPackages.${system}; shared-config = import "${self}/lib/shared/home-manager.nix" { @@ -38,7 +40,12 @@ inputs.home-manager.lib.homeManagerConfiguration { home.sessionVariables = { DIRENV_LOG_FORMAT = ""; EDITOR = "nvim"; - PATH = "$PATH:./vendor/bin:./node_modules/.bin"; + PATH = lib.concatStringsSep ":" [ + "$PATH" + "$HOME/go/bin" + "./vendor/bin" + "./node_modules/.bin" + ]; PULUMI_SKIP_UPDATE_CHECK = "true"; REPOS = "$HOME/Code"; RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config";