Coder Social home page Coder Social logo

Comments (4)

Hoverbear avatar Hoverbear commented on June 28, 2024

I think nix --extra-experimental-features "nix-command flakes" run nix-darwin -- switch --flake . might do it?

from nix-installer.

byrongibson avatar byrongibson commented on June 28, 2024

Thanks, same error though.

%> nix --extra-experimental-features "nix-command flakes" run nix-darwin -- switch --flake .
building the system configuration...
Password:
error: Unexpected files in /etc, aborting activation
The following files have unrecognized content and would be overwritten:

  /etc/nix/nix.conf
  /etc/zshenv

Please check there is nothing critical in these files, rename them by adding .before-nix-darwin to the end, and then try again.
%>

Any idea why isn't it recognizing its own nix.conf? Here are the contents btw, just the autogenerated defaults from the installer:

# Generated by https://github.com/DeterminateSystems/nix-installer.
# See `/nix/nix-installer --version` for the version details.

build-users-group = nixbld
experimental-features = nix-command flakes repl-flake
bash-prompt-prefix = (nix:$name)\040
max-jobs = auto
extra-nix-path = nixpkgs=flake:nixpkgs
upgrade-nix-store-path-url = https://install.determinate.systems/nix-upgrade/stable/universal
/etc/nix/nix.conf (END)

from nix-installer.

byrongibson avatar byrongibson commented on June 28, 2024

Oh wait, renaming /etc/nix/nix.conf back to /etc/nix/nix.conf.before-nix-darwin and then rerunning that command fixed it:

%> nix --extra-experimental-features "nix-command flakes" run nix-darwin -- switch --flake .
building the system configuration...
Password:
user defaults...
setting up user launchd services...
setting up /Applications/Nix Apps...
setting up pam...
applying patches...
setting up /etc...
system defaults...
setting up launchd ng service org.nixos.activate-system
reloading service org.nixos.nix-daemon
reloading nix-daemon...
waiting for nix-daemon
waiting for nix-daemon
configuring networking...
%> 

New /etc/nix/nix.conf:

# WARNING: this file is generated from the nix.* options in
# your nix-darwin configuration. Do not edit it!
allowed-users = *
auto-optimise-store = false
build-users-group = nixbld
builders =
cores = 0
experimental-features = nix-command flakes
extra-experimental-features = nix-command
extra-sandbox-paths =
max-jobs = auto
require-sigs = true
sandbox = false
sandbox-fallback = false
substituters = https://cache.nixos.org/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-substituters =
trusted-users = root

/etc/nix/nix.conf (END)

from nix-installer.

janurskremer avatar janurskremer commented on June 28, 2024

I have the same issue when I do darwin-rebuild switch --flake . each time after rebooting my system.

from nix-installer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.