Skip to content

Commit d73fb5f

Browse files
committed
fix: see how nix was installed on this machine originally
1 parent 893836e commit d73fb5f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/testinfra-ami-build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,43 @@ jobs:
5454
- name: Checkout Repo
5555
uses: supabase/postgres/.github/actions/shared-checkout@HEAD
5656

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+
5794
- name: Install nix
5895
uses: cachix/install-nix-action@v27
5996
with:

0 commit comments

Comments
 (0)