From 3755e30bd2ebf4bf382dc45c20cffaacfb86a578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 1 Mar 2023 05:29:17 +0000 Subject: [PATCH 1/2] Support new Nix 2.14 profile PATH --- install-nix.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install-nix.sh b/install-nix.sh index b2d254fe..fbe0d151 100755 --- a/install-nix.sh +++ b/install-nix.sh @@ -87,6 +87,8 @@ fi # Set paths echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH" +# new path for nix 2.14 +echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH" if [[ $INPUT_NIX_PATH != "" ]]; then echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV" From 167742cb88c69ac5973aeb26d4ccced45567405e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 1 Mar 2023 05:48:32 +0000 Subject: [PATCH 2/2] don't insist $USER needs to be set --- install-nix.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install-nix.sh b/install-nix.sh index fbe0d151..9a897c18 100755 --- a/install-nix.sh +++ b/install-nix.sh @@ -20,7 +20,7 @@ add_config() { # Set jobs to number of cores add_config "max-jobs = auto" # Allow binary caches for user -add_config "trusted-users = root $USER" +add_config "trusted-users = root ${USER:-}" # Add github access token if [[ $INPUT_GITHUB_ACCESS_TOKEN != "" ]]; then add_config "access-tokens" "github.com=$INPUT_GITHUB_ACCESS_TOKEN" @@ -86,7 +86,6 @@ fi # Set paths echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" -echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH" # new path for nix 2.14 echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH"