@@ -54,42 +54,20 @@ jobs:
5454 - name : Checkout Repo
5555 uses : supabase/postgres/.github/actions/shared-checkout@HEAD
5656
57- - name : Diagnose existing Nix installation
57+ - name : Remove existing DeterminateSystems Nix installation
5858 run : |
59- echo "=== Nix installation diagnostics ==="
59+ # Use the built-in DeterminateSystems uninstaller
60+ if [ -f /nix/nix-installer ]; then
61+ echo "Found DeterminateSystems nix-installer, using built-in uninstaller"
62+ sudo /nix/nix-installer uninstall --no-confirm || true
63+ else
64+ echo "No DeterminateSystems installer found to uninstall"
65+ fi
6066
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"
67+ # Verify removal
68+ echo "Verifying nix removal..."
69+ which nix || echo "nix command no longer available"
70+ ls -la /nix 2>/dev/null || echo "/nix directory removed"
9371
9472 - name : Install nix
9573 uses : cachix/install-nix-action@v27
0 commit comments