fix: create /nix when installing nix on root runners
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 17s

This commit is contained in:
2026-02-28 16:47:22 +00:00
parent 5669305e59
commit 9e922dd62c
2 changed files with 10 additions and 0 deletions

View File

@@ -99,6 +99,11 @@ jobs:
fi
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
if [ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then

View File

@@ -100,6 +100,11 @@ jobs:
NIX_CONFIG: experimental-features = nix-command flakes
run: |
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
fi