Nix on macOS | 1194 Members | |
| “There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org | 199 Servers |
| Sender | Message | Time |
|---|---|---|
| 12 Mar 2026 | ||
| i just received my new macbook and im trying to setup nix-darwin with determinate nix but im not sure how im supposed to generate the configuration... determinate's docs say nix flake init --template "https://flakehub.com/f/DeterminateSystems/flake-templates/0#nix-darwin"but nix-darwin docs say i should create /etc/nix-darwin, chown it, and then run nix flake init -t nix-darwin/nix-darwin-25.11...im not sure how to understand any of this because i am still very unfamiliar with nix in general 😰 am i supposed to run nix flake init --template "https://flakehub.com/f/DeterminateSystems/flake-templates/0#nix-darwin" in ~? it creates .envrc and flake.nix files and i dont know where im supposed to put them | 16:32:48 | |
| i just received my new macbook and im trying to setup nix-darwin with determinate nix but im not sure how im supposed to generate the configuration... determinate's docs say nix flake init --template "https://flakehub.com/f/DeterminateSystems/flake-templates/0#nix-darwin"but nix-darwin docs say i should create /etc/nix-darwin, chown it, and then run nix flake init -t nix-darwin/nix-darwin-25.11...im not sure how to understand any of this because i am still very unfamiliar with nix in general 😰 am i supposed to run nix flake init --template "https://flakehub.com/f/DeterminateSystems/flake-templates/0#nix-darwin" in ~? it creates .envrc and flake.nix files and i dont know where im supposed to have them | 16:32:57 | |
oh i had no realized with determinate's template you're supposed to run nix develop --command apply-nix-darwin-configuration instead of nix flake init -t nix-darwin/nix-darwin-25.11 whoopslooks like it worked! | 17:33:44 | |
| I'm still running M1 with 8gb of RAM and it works reasonably well for most tasks | 17:38:17 | |
| i did it!!! however im not sure how to configure my system preferences... of course, because i have multiple users, and system preferences are per-user, they need to somehow be defined for each user on the system and shouldn't rely on primaryUseri looked into "home manager" but i dont really understand how it can achieve that? also it seems to be not very beginner friendly (im scared) | 21:41:23 | |
| is there a way i can define a default system configuration "template" that i then tweak for each user i want to apply it to? | 21:42:19 | |
| (in my case, i dont think i have any user-specific setting so all users would just be using the same configuration) | 21:43:00 | |
| how can i install homebrew packages with nix-darwin in a multi-user scenario? | 22:50:31 | |
| you can specify a target dir for each package | 23:14:35 | |
i read somewhere some people isolate homebrew with a separate user account, what does it look like in practice? is it like creating a user named brew or something and then setting up homebrew.user = "brew"? | 23:17:48 | |
| oh neat! what would the target dir look like to install a cask named foo for user alice only? | 23:19:40 | |
| see example conf here https://mynixos.com/nix-darwin/option/homebrew.casks | 23:28:01 | |
| 23:32:29 | |
* | 23:35:32 | |
| in homebrew.casks = [] instead of just foo | 23:36:54 | |
* in homebrew.casks = [] instead of just foo | 23:37:33 | |
| 13 Mar 2026 | ||
| oooh thank you so much | 01:33:48 | |
ok so the idea is to literally put them in ~alice | 01:34:36 | |
| didn't know that was possible! awesome | 01:34:51 | |
but then if i have a system with, say, users alice and bob, and i want to install cask foo for alice only, cask bar for bob only and cask baz for bothwho should be the homebrew.user? thats the main thing im confused about rn because in my case neither alice nor bob stand out as the "main" user really, they're both sharing the same system but i wanna be able to do edit and update my nix-darwin config from both ideally (they're both admin) | 01:37:46 | |
but then if i have a system with, say, users alice and bob, and i want to install cask foo for alice only, cask bar for bob only and cask baz for bothwho should be the homebrew.user? thats the main thing im confused about rn because in my case neither alice nor bob stand out as the "main" user really, they're both sharing the same system but i wanna be able to do edit and update my nix-darwin config from both ideally (they're both admin btw) | 01:37:49 | |
(i actually have the same question with system settings and system.primaryUser, it's unclear which one should be the "primaryUser" in this case... there isn't one!) | 01:38:52 | |
| Home-manager isn't terribly hard and will be better for keeping a declaratrive system definition than using homebrew. You can search github for home-manager configurations | 03:15:49 | |
| e.g., here’s mine: https://github.com/reckenrode/nixos-configs | 03:57:39 | |
| 05:56:58 | ||
| oh cool thanks! i will look into it! | 09:32:39 | |
| nasso: Re sharing packages between multiple users, you can probably just do a local binding somewhere `let sharedPackages = [ pkgs.package-a pkgs.package-b ]; in users.alice.packages = sharedPackages ++ [ pkgs.package-c ]; ...`. | 10:13:30 | |
| yeah for regular nix packages that seems easy | 10:14:08 | |
| i also realized shortly after asking my question that the same problem exists for mac app store apps lol i dont even think macOS has a native way to install mac app store apps only for one user... that seems... sucky | 10:14:58 | |
| on a multi user system, don't set it | 11:30:18 | |