Merge pull request 'fix: create /nix when installing nix on root runners' (#41) from stage into master
Some checks failed
Terraform Apply / Terraform Apply (push) Failing after 33s
Some checks failed
Terraform Apply / Terraform Apply (push) Failing after 33s
Reviewed-on: #41
This commit was merged in pull request #41.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user