Nix on macOS | 1163 Members | |
| “There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org | 188 Servers |
| Sender | Message | Time |
|---|---|---|
| 1 Oct 2025 | ||
Hey folks, I authored https://github.com/nix-darwin/nix-darwin/pull/1530. Looks like you are right; I did a fresh install of MacOS and got this error on bootstrap… and then blindly assumed therefore the issue would persist after that as well. I used nh darwin after that which does give me the error every time, but sudo darwin-rebuild doesn't.Shall I change the PR to only update the bootstrap command to use sudo -i? I can investigate what nh is doing separately. | 17:30:37 | |
| Hey folks, I authored https://github.com/nix-darwin/nix-darwin/pull/1530. Looks like you are right; I did a fresh install of MacOS and got this error on bootstrap… and then blindly assumed therefore the issue would persist after that as well. I used nh darwin after that which does give me the error every time, but sudo darwin-rebuild doesn't.Shall I change the PR to only update the bootstrap command to use sudo -i? I can investigate what nh is doing separately. | 17:31:01 | |
| 17:33:47 | ||
| Oh and thanks for all the amazing work on nix-darwin. I love it. | 17:34:39 | |
| yeah that sounds like a nh bug | 17:37:44 | |
| or at least they are not working around that message the way that we are | 17:37:54 | |
| what's the exact command you're running for the bootstrap? | 17:38:49 | |
| Yeah, it is solved by a PR but not merged to 25.05 | 17:43:41 | |
| I have again done an init with unstable | 17:43:56 | |
| How do we switch from unstable to stable and vice-versa | 17:44:55 | |
| is there a command or where do all do I have to manually change in flake.conf | 17:45:20 | |
| just change your inputs in flake.nix | 17:46:36 | |
| and then rebuild | 17:46:43 | |
| and then maybe rebuild again to make sure you're using the version of darwin-rebuild from your new channel | 17:47:07 | |
sudo nix run nix-darwin/master#darwin-rebuild -- switch as in the docs, I made sure to follow the flake instructions verbatim | 18:18:48 | |
Perhaps that’s the nix run already causing the warning before darwin-rebuild even does anything? Either way that one’s easily solved with sudo -i, it’s a one-off anyway | 18:20:54 | |
| yeah I think you're right | 19:02:41 | |
| I’ll go over the documented commands tomorrow to verify, and will update the PR | 19:58:53 | |
| 2 Oct 2025 | ||
| I don't understand what's wrong with C++ interop... | 04:03:58 | |
it's fine with import CxxStdlib but it seems like all the bridging functionality is missing | 04:05:20 | |
sudo nix run nix-darwin/master#darwin-rebuild -- switch throws the warning before even fetching nix-darwin, so that’s just what you get when running sudo nix <anything> | 08:04:39 | |
I tested all commands in README.md: sudo nix run nix-darwin/master#darwin-rebuild -- switch throws the warning before even fetching nix-darwin, so that’s just what you get when running sudo nix <anything>. Same for sudo nix-channel.I updated the PR to no longer suggest using sudo -i when running darwin-build or darwin-uninstall because those indeed do not emit the warning :) | 08:31:21 | |
Somewhat related: I was apprehensive to use nix-darwin when I first tried it because of this warning, but also because nix config check throws a fit about having two versions of nix installed. I realise now how little this matters, but coming from using brew doctor this really seemed like an issue: in my mind a clean install of nix-darwin made my nix installation “unhealthy".Do you think it’d be worthwhile adding a few lines about this to README.md for newcomers, to explain the various options you have?
| 08:43:55 | |
Somewhat related: I was apprehensive to use nix-darwin when I first tried it because of this warning, but also because nix config check throws a fit about having two versions of nix installed. I realise now how little this matters, but coming from using brew doctor this really seemed like an issue: in my mind a clean install of nix-darwin made my nix installation “unhealthy".Do you think it’d be worthwhile adding a few lines about this to README.md for newcomers, to explain the various options you have?
If so, I’d be happy to add that | 08:44:56 | |
Somewhat related: I was apprehensive to use nix-darwin when I first tried it because of this warning, but also because nix config check throws a fit about having two versions of nix installed. I realise now how little this matters, but coming from using brew doctor this really seemed like an issue: in my mind a clean install of nix-darwin made my nix installation “unhealthy".Do you think it’d be worthwhile adding a few lines about this to README.md for newcomers, to explain the various options you have?
If so, I’d be happy to add that. And just out of curiosity, what’s the reason for nix-darwin’s version of nix lagging so far behind? | 08:48:22 | |
| 09:21:58 | ||
| use nh it only ask for sudo when needed | 09:29:23 | |
| which is when the actual switch happens | 09:29:35 | |
| nh doesn’t seem to change the home dir though, so essentially running sudo instead of sudo -i. Meaning I get that warning every time I run it. It’s not harmful but it’s not pretty either. | 09:31:03 | |
| I think it does mess things up if you manage channels. | 09:32:19 | |