Comments (6)
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.
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.
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.
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.
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.
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)
- darwin-rebuild: Incorrect usage description HOT 1
- How do I uninstall nix-darwin or rollback previous version when nix can not build the uninstaller HOT 2
- `show-config` fails when verifying the nix-config when using nix-master HOT 1
- Is there a way to "evaluate" my configuration? HOT 3
- DictationHotKey is reset HOT 1
- feature request: support preStart in launchd daemons
- `darwin-rebuild` broken on 10.14 HOT 1
- question: how to see stdout/stderr of nix-gc service? HOT 1
- [darwin-rebuild switch] - error: file 'darwin' was not found HOT 1
- switch to a flake on a apple silicon m2 MacBookPro , complains about itself is a "x86_64" machine HOT 5
- FR / package request: hammerspoon HOT 1
- Should i uninstall nix-darwin standalone before installing with flake
- nix-darwin / home-manager nixos-render-docs version mismatch HOT 1
- "?submodules=1" Not being acknowledged in Nix Darwin flakes HOT 1
- error: attribute 'definitionsWithLocations' missing"
- "error: attribute 'definitionsWithLocations' missing" after nix-channel --update HOT 2
- linux-builder fails with generic/unhelpful error when nix.linux-builder.package uses nixpkgs unstable HOT 2
- Uninstall fails on fresh install HOT 2
- Option to disable zsh global compinit
- remapTilde stopped working on Sonoma HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix-darwin.