Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: getting status of '/etc/nix/registry.json': Permission denied #1371

Open
bashfulrobot opened this issue Mar 6, 2025 · 0 comments
Open

Comments

@bashfulrobot
Copy link

Hi there, I am just having my first go with nix-darwin, and I was attempting to install with:

dustin.krysak@dustin nixcfg % curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
  sh -s -- install --determinate
info: downloading installer https://install.determinate.systems/nix/tag/v3.0.0/nix-installer-aarch64-darwin
 INFO nix-installer v3.0.0
`nix-installer` needs to run as `root`, attempting to escalate now via `sudo`...
Password:
 INFO nix-installer v3.0.0
 INFO For a more robust Nix installation, use the Determinate package for macOS: https://dtr.mn/determinate-nix
Nix install plan (v3.0.0)
Planner: macos

Configured settings:
* determinate_nix: true

Planned actions:
* Install Determinate Nixd
* Create an encrypted APFS volume `Nix Store` for Nix on `disk3` and add it to `/etc/fstab` mounting on `/nix`
* Extract the bundled Nix (originally from /nix/store/cmirclrq3l1lnvm8psd1xrh5kiwabzx9-nix-binary-tarball-3.0.0/nix-3.0.0-aarch64-darwin.tar.xz) to `/nix/temp-install-dir`
* Create a directory tree in `/nix`
* Synchronize /nix/var ownership
* Move the downloaded Nix into `/nix`
* Synchronize /nix/store ownership
* Create build users (UID 351-382) and group (GID 350)
* Configure Time Machine exclusions
* Setup the default Nix profile
* Place the Nix configuration in `/etc/nix/nix.conf`
* Configure the shell profiles
* Configuring zsh to support using Nix in non-interactive shells
* Unload, then recreate a `launchctl` plist to put Nix into your PATH
* Configure the Determinate Nix daemon
* Remove directory `/nix/temp-install-dir`


Proceed? ([Y]es/[n]o/[e]xplain): y
 INFO Step: Install Determinate Nixd
 INFO Step: Create an encrypted APFS volume `Nix Store` for Nix on `disk3` and add it to `/etc/fstab` mounting on `/nix`
 INFO Step: Provision Nix
 INFO Step: Create build users (UID 351-382) and group (GID 350)
 INFO Step: Configure Time Machine exclusions
 INFO Step: Configure Nix
 INFO Step: Configuring zsh to support using Nix in non-interactive shells
 INFO Step: Unload, then recreate a `launchctl` plist to put Nix into your PATH
 INFO Step: Configure the Determinate Nix daemon
 INFO Step: Remove directory `/nix/temp-install-dir`
Nix was installed successfully!
To get started using Nix, open a new shell or run `. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh`

dustin.krysak@dustin nixcfg % . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
dustin.krysak@dustin nixcfg % . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
dustin.krysak@dustin nixcfg % nix run nix-darwin/nix-darwin-24.11#darwin-rebuild -- switch
error: getting status of '/etc/nix/registry.json': Permission denied

But I keep getting this permission denied. And that file does not seem to exist.

dustin.krysak@dustin nixcfg % sudo ls /etc/nix
Password:
macos-keychain.crt	nix.conf		nix.custom.conf

Any ideas?

Cheers.

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

No branches or pull requests

1 participant