nix-installer
nix-installer copied to clipboard
Failed to install Nix on MacOS agent for our CICD (Semaphore CI)
Tried to install Nix on our MacOS agents (s1-prod-macos-13-5-arm64 as we name them)
- |
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install --no-confirm \
--extra-conf "trusted-users = $(whoami)"
Error
Error:
0: Install failure
1: Error executing action
2: Action `provision_nix` errored
3: Action `create_nix_tree` errored
4: Action `create_directory` errored
5: Creating directory `/nix/var`
6: Operation not permitted (os error 1)
Metadata
| key | value |
|---|---|
| version | 3.7.0 |
| os | macos |
| arch | aarch64 |
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --no-confirm --determinate
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
works for us on Semaphore CI
Oh, sorry that's for Linux, not Mac.
@fzakaria are these ephemeral installations of macOS, or long running? Either way: is this step part of an orchestration tool or something?
Just CI like a GitHub Acrtion
@grahamc Here are the logs
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install --no-confirm \
--extra-conf "trusted-users = $(whoami)"
Failed in
00:18
info: downloading installer https://install.determinate.systems/nix/tag/v3.8.4/nix-installer-aarch64-darwin00:00
INFO nix-installer v3.8.400:04
`nix-installer` needs to run as `root`, attempting to escalate now via `sudo`...00:04
INFO nix-installer v3.8.400:04
INFO For a more robust Nix installation, use the Determinate package for macOS: https://dtr.mn/determinate-nix00:05
INFO Step: Create an APFS volume `Nix Store` for Nix on `disk5` and add it to `/etc/fstab` mounting on `/nix`00:05
INFO Step: Provision Nix00:18
ERROR Error saving receipt: RecordingReceipt("/nix/receipt.tmp", Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" })00:18
0: Install failure00:18
1: Error executing action00:18
2: Action `provision_nix` errored00:18
3: Action `create_nix_tree` errored00:18
4: Action `create_directory` errored00:18
5: Creating directory `/nix/var`00:18
6: Operation not permitted (os error 1)00:18
Location:00:18
/nix/var/nix/builds/nix-build-nix-installer-static-arm64-apple-darwin-3.8.4.drv-1576-3731673486/nix-installer-source/src/cli/subcommand/install/mod.rs:30900:18
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.00:18
Run with RUST_BACKTRACE=full to include source snippets.00:18
Consider reporting this error using this URL: https://github.com/DeterminateSystems/nix-installer/issues/new?title=%3Cautogenerated-issue%3E&body=%23%23+Error%0A%60%60%60%0AError%3A+%0A+++0%3A+Install+failure%0A+++1%3A+Error+executing+action%0A+++2%3A+Action+%60provision_nix%60+errored%0A+++3%3A+Action+%60create_nix_tree%60+errored%0A+++4%3A+Action+%60create_directory%60+errored%0A+++5%3A+Creating+directory+%60%2Fnix%2Fvar%60%0A+++6%3A+Operation+not+permitted+%28os+error+1%29%0A%60%60%60%0A%0A%23%23+Metadata%0A%7Ckey%7Cvalue%7C%0A%7C--%7C--%7C%0A%7C**version**%7C3.8.4%7C%0A%7C**os**%7Cmacos%7C%0A%7C**arch**%7Caarch64%7C%0A00:18
WARN Installing Nix failed, but there's hope: try the Determinate package for macOS. Check it out: https://dtr.mn/determinate-nix
It's already trying root so not sure why still Operation Not Permitted.