Nix on macOS | 1169 Members | |
| “There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org | 192 Servers |
| Sender | Message | Time |
|---|---|---|
| 9 Mar 2026 | ||
| 00:42:37 | ||
| 16:23:36 | ||
| I am a new nix-darwin user, and I'm currently trying to install nix-darwin and lix on my Mac. I've chosen ryan4yin/nix-darwin-kickstarter as my starter configuration. However, I noticed the following comment in the repo: nix.enable = true; # TODO: set this to false if you're using Determinate Nix. I don't quite understand what Determinate Nix is. My question is: if I install lix using the "New Installs" method from the official lix documentation (curl -sSf -L https://install.lix.systems/lix | sh -s -- install), do I need to set nix.enable = false? Also, if I do set nix.enable = false, how should I configure options like substituters and gc? | 16:36:28 | |
| Determinate Nix is another fork (they say "distribution") of Nix | 16:37:59 | |
You can use nix.enable = true with Lix, though you'll want to also set nix.package = pkgs.lixPackageSets.latest.lix or similar | 16:38:21 | |
| Okay, thank you for your answer. | 16:40:53 | |
| i will soon get a new macbook for work, and i was thinking maybe i might bite the bullet and try out nix-darwin on it?? im pretty new to nix still, and my main concern here is multi-user support. because i want to use this machine for both work and personal stuff, i need to setup two users (unclear yet which one(s) will be admin). is this a supported use-case for nix-darwin? how will that work??? (also i have never had multiple users on macOS so i guess im also new to that part lol) | 17:24:56 | |
| we do support multiple users, yes. it should Just Work, though some nix-darwin options really only apply to the activating user so you may want to avoid those and control them with home-manager instead | 17:33:22 | |
| You might also want to have a look at the nix.settings.trusted-users option. | 17:35:11 | |
| cool! thanks! i wonder if i will regret learning nix + nix-darwin + multi-user macOS all at once | 17:37:44 | |
| There is not much to learn on the macOS side of things, don't worry. Users can either be admins or not, that's pretty much it. | 17:40:48 | |
| 10 Mar 2026 | ||
| Still regarding this issue, I just took a look at the lix installer repo and noticed it says 'Based on the Determinate Installer.'(https://git.lix.systems/lix-project/lix-installer#:~:text=A%20fast%2C%20friendly%2C%20and%20reliable%20tool%20to%20help%20you%20use%20Lix%2C%20the%20community%20implementation%20of%20the%20nix%20tooling.%20Based%20on%20the%20Determinate%20Installer.) Does this mean I really should be setting nix.enable = false? | 02:45:34 | |
No. Det Nix has a daemon that takes over some system manage stuff. Lix relies on the user (e.g., via nix-darwin) to update it. nix.enable should be true with Lix. | 02:53:59 | |
| The installer is just what does the initial setup (creating the store, etc). The old installer is written in Bash. The Det Nix one (also used by Lix) is written in Rust. | 02:54:53 | |
| Got it, thanks for the reply. I looked through the ryan4yin/nix-darwin-kickstarter issues (https://github.com/ryan4yin/nix-darwin-kickstarter/issues/5) and it looks like this compatibility problem has already been fixed. | 03:04:35 | |
Download image.png | 06:37:23 | |
| Is there a way to rebuild without using sudo directly? I don't want the generated lock file to be owned by root. | 06:37:26 | |
darwin-rebuild build && sudo darwin-rebuild switch i suppose? | 06:38:17 | |
You can just run nix flake update first to generate the lockfile | 06:38:26 | |
| what generated lock file are you atalkinga bout | 06:38:31 | |
| because yeah flake.lock is usually written by other tooling | 06:38:50 | |
| * because yeah flake.lock is usually written by other commands | 06:39:16 | |
| * what generated lock file are you talking about | 06:39:25 | |
| solved the problem by running darwin-rebuild build && sudo darwin-rebuild switch | 06:43:54 | |
Download image.png | 06:44:18 | |
that does work though i would follow k900's suggestion and use nix flake update (if updating) or nix flake lock (if adding a new flake input) instead | 06:46:55 | |
though on the other hand i'm the kind of insane who has set up my configuration to throw an eval error if i'm not on a clean git commit, so darwin-rebuild build && sudo darwin-rebuild switch woudn't work for me anyway | 06:48:22 | |
* though on the other hand i'm the kind of insane who has set up my configuration to throw an eval error if i'm not on a clean git commit, so darwin-rebuild build && sudo darwin-rebuild switch wouldn't work for me anyway | 06:48:27 | |
| I used NixOS two years ago, and back then I used nh. I just checked and saw that nh supports aarch64-darwin, but there aren't any configuration options for it in the nix-darwin manual. I'm planning to look into whether using nh on nix-darwin is a good idea tomorrow. | 06:53:34 | |
| nh works on nix-darwin but note the command line is nh darwin ... rather than nh os .... And there are less options for darwin when you do more than switch anmd build. I just use nh from the command-line with no configuration options so the same for Linux and macOS | 08:04:49 | |