Skip to content

Conversation

@jfroche
Copy link
Contributor

@jfroche jfroche commented Dec 16, 2025

Replace DeterminateSystems/nix-installer-action with a standalone implementation that makes it easy for anyone to install Nix in their GitHub Actions workflows.

@jfroche jfroche force-pushed the action/init branch 9 times, most recently from d07c150 to ba78b94 Compare December 17, 2025 18:46
Replace DeterminateSystems/nix-installer-action with a standalone
implementation that makes it easy for anyone to install Nix in their
GitHub Actions workflows.

Tested successfully with act using v3.11.3 release.
Previously, the --add-channel flag used SetFalse which was confusing:
- Passing the flag would DISABLE channels
- Default was to enable channels

Now it uses SetTrue which is intuitive:
- Passing --add-channel ENABLES channels
- Default is to disable channels (no unnecessary channel updates)
@jfroche jfroche force-pushed the action/init branch 2 times, most recently from 37d9332 to 58308d4 Compare December 17, 2025 21:34
The installer was using dirs::home_dir() which reads the $HOME environment
variable. On macOS, sudo preserves the original user's HOME by default (unlike
Linux which resets it to /root), causing channels to be created in
/Users/runner/.nix-channels.

The fix uses nix::unistd::User to look up root's actual home directory from
/etc/passwd, which is:
- /var/root on macOS
- /root on Linux
@Mic92 Mic92 merged commit 95c9e6e into main Jan 14, 2026
11 checks passed
@Mic92 Mic92 deleted the action/init branch January 14, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants