|
54 | 54 | - name: Checkout Repo
|
55 | 55 | uses: supabase/postgres/.github/actions/shared-checkout@HEAD
|
56 | 56 |
|
| 57 | + - name: Diagnose existing Nix installation |
| 58 | + run: | |
| 59 | + echo "=== Nix installation diagnostics ===" |
| 60 | + |
| 61 | + # Check if nix command exists and where |
| 62 | + which nix || echo "nix command not found in PATH" |
| 63 | + ls -la /nix 2>/dev/null || echo "/nix directory does not exist" |
| 64 | + |
| 65 | + # Check installation method traces |
| 66 | + echo "--- Checking for DeterminateSystems installer traces ---" |
| 67 | + ls -la /nix/.nix-installer* 2>/dev/null || echo "No DeterminateSystems installer traces found" |
| 68 | + cat /nix/.nix-installer* 2>/dev/null || echo "No installer receipt file" |
| 69 | + |
| 70 | + echo "--- Checking for cachix installer traces ---" |
| 71 | + ls -la /etc/systemd/system/nix-daemon.service 2>/dev/null || echo "No systemd nix-daemon service" |
| 72 | + systemctl status nix-daemon 2>/dev/null || echo "nix-daemon not running via systemd" |
| 73 | + |
| 74 | + echo "--- Checking for manual installation traces ---" |
| 75 | + ls -la /etc/bash.bashrc | grep -C2 nix || echo "No nix in /etc/bash.bashrc" |
| 76 | + ls -la /etc/profile | grep -C2 nix || echo "No nix in /etc/profile" |
| 77 | + |
| 78 | + echo "--- Checking nix store and configuration ---" |
| 79 | + ls -la /nix/store 2>/dev/null | head -10 || echo "No /nix/store" |
| 80 | + ls -la /etc/nix/ 2>/dev/null || echo "No /etc/nix directory" |
| 81 | + cat /etc/nix/nix.conf 2>/dev/null || echo "No /etc/nix/nix.conf" |
| 82 | + |
| 83 | + echo "--- Checking user-level nix ---" |
| 84 | + ls -la ~/.nix-* 2>/dev/null || echo "No user nix directories" |
| 85 | + env | grep -i nix || echo "No nix environment variables" |
| 86 | + |
| 87 | + echo "--- Checking processes ---" |
| 88 | + ps aux | grep -i nix || echo "No nix processes running" |
| 89 | + |
| 90 | + echo "--- Checking nix version and info ---" |
| 91 | + nix --version 2>/dev/null || echo "Cannot get nix version" |
| 92 | + nix show-config 2>/dev/null || echo "Cannot show nix config" |
| 93 | +
|
57 | 94 | - name: Install nix
|
58 | 95 | uses: cachix/install-nix-action@v27
|
59 | 96 | with:
|
|
0 commit comments