Source Nix before KVM workflow bootstrap
Some checks failed
KVM Publishable Validation / publishable-kvm-suite (push) Failing after 5s
Some checks failed
KVM Publishable Validation / publishable-kvm-suite (push) Failing after 5s
This commit is contained in:
parent
a581c9f3b9
commit
8bb926d66f
1 changed files with 13 additions and 3 deletions
16
.github/workflows/kvm-publishable-selfhosted.yml
vendored
16
.github/workflows/kvm-publishable-selfhosted.yml
vendored
|
|
@ -15,14 +15,24 @@ jobs:
|
|||
- name: Ensure Nix Is Available
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if ! command -v nix >/dev/null 2>&1; then
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
|
||||
fi
|
||||
export PATH="/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:$PATH"
|
||||
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
elif [[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]]; then
|
||||
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
||||
fi
|
||||
if ! command -v nix >/dev/null 2>&1; then
|
||||
if ! command -v xz >/dev/null 2>&1; then
|
||||
echo "Nix is not on PATH and xz is unavailable for bootstrap"
|
||||
exit 1
|
||||
fi
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
|
||||
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
elif [[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]]; then
|
||||
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
||||
fi
|
||||
fi
|
||||
mkdir -p "$HOME/.config/nix"
|
||||
printf '%s\n' 'experimental-features = nix-command flakes' > "$HOME/.config/nix/nix.conf"
|
||||
nix --version
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue