fix: create /nix when installing nix on root runners
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 17s
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 17s
This commit is contained in:
@@ -99,6 +99,11 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Nix missing; installing no-daemon Nix for this runner job"
|
echo "Nix missing; installing no-daemon Nix for this runner job"
|
||||||
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
|
mkdir -p /nix
|
||||||
|
chown root:root /nix
|
||||||
|
chmod 0755 /nix
|
||||||
|
fi
|
||||||
sh <(curl -L https://nixos.org/nix/install) --no-daemon
|
sh <(curl -L https://nixos.org/nix/install) --no-daemon
|
||||||
|
|
||||||
if [ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
|
if [ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
|
||||||
|
|||||||
@@ -100,6 +100,11 @@ jobs:
|
|||||||
NIX_CONFIG: experimental-features = nix-command flakes
|
NIX_CONFIG: experimental-features = nix-command flakes
|
||||||
run: |
|
run: |
|
||||||
if [ ! -x /nix/var/nix/profiles/default/bin/nix ] && ! command -v nix >/dev/null 2>&1; then
|
if [ ! -x /nix/var/nix/profiles/default/bin/nix ] && ! command -v nix >/dev/null 2>&1; then
|
||||||
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
|
mkdir -p /nix
|
||||||
|
chown root:root /nix
|
||||||
|
chmod 0755 /nix
|
||||||
|
fi
|
||||||
sh <(curl -L https://nixos.org/nix/install) --no-daemon
|
sh <(curl -L https://nixos.org/nix/install) --no-daemon
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user