Git Product home page Git Product logo

Comments (6)

rerb avatar rerb commented on August 17, 2024 2

Note, any other miserable castaways and flotsam-dodgers on the choppy seas of nix-on-macos, you're gonna need to insert lib into the curly-brace-demarcated, comma-separated list at the beginning of your darwin-configuration.nix, if it ain't already there.

from nix-darwin.

ericpashman avatar ericpashman commented on August 17, 2024 1

FYI, to remove the root profile path from nix.nixPath, you must use mkForce because a change earlier this year made setting nix.nixPath merge rather than reset its entries. In your darwin-configuration.nix, add something like this:

  nix.nixPath = lib.mkForce [ "darwin-config=/configuration.nix" ... ];

As far as I can tell, this behavior is documented only in the CHANGELOG.

But while this does reset nix.nixPath, it does not change my NIX_PATH at all! Does anybody know what's going on here?

EDIT: Doing something like source ${config.system.build.setEnvironment} in my shellInit does update NIX_PATH, but surely I'm not meant to have to do that?

from nix-darwin.

LnL7 avatar LnL7 commented on August 17, 2024

Was the error message this?

error: Using the nix-daemon requires build users, aborting activation
Create the build users or disable the daemon:
$ ./bootstrap -u

or set

    services.nix-daemon.enable = false;

This is one of the checks put into place to avoid problems that are hard to recover from, at this point nothing should have happened yet. You can just edit the configuration and rebuild again if that's the case.

As for channels, that's a good point. It's probably best to extend NIX_PATH dynamically, like we do now on nixos.

from nix-darwin.

grossbart avatar grossbart commented on August 17, 2024

Yes, the error message was indeed the nix-daemon requires build users one. I was a bit overwhelmed with the recommendation to create them myself, as I had no idea what users to create and where to start.

If I can just restart all is fine, it's also what I did. But then I got the error with the NIX_PATH and wasn't sure whether that was due to the missing build users or the aborted install …

So it seems that technically all is well and that it was just an unfortunate combination of errors that was confusing, thanks for your help!

from nix-darwin.

LnL7 avatar LnL7 commented on August 17, 2024

Ah yes. You would have had to run the installer again if it didn't succeed the first time, that should work as expected with an existing configuration.

from nix-darwin.

ericpashman avatar ericpashman commented on August 17, 2024

I get this warning on running any darwin-* command:

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring

In my case this warning isn't related to the daemon, but I'm posting here because I think it's another reason the default nix.nixPath should change per the OP's suggestion.

I get the warning simply because the default Nix installation script for a single-user installation does not create a user profile for root, so the path doesn't exist. It seems clear that the nix-darwin installer should only add this path to the default nix.nixPath after checking for a multi-user Nix installation (or that the path exists).

from nix-darwin.

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.