| 26 Mar 2026 |
K900 | Well that was great | 16:30:34 |
K900 | It almost finished building on the community builder | 16:30:50 |
K900 | And my connection dropped | 16:30:53 |
nasso | not sure if specific to nix-darwin (might be a general nixos problem) but having my config in /etc/nix-darwin is pretty annoying in a multi-user setup because i can't easily edit it from different user accounts??? mostly because git really doesn't keep g=u permissions on the files (or maybe its jj but i doubt it)
so im thinking instead of fighting git, which really isn't made for having multiple users share the same repositories, i might just keep a separate clone of my config in ~/.config/nix-darwin?? is this what people do | 17:43:46 |
nasso | not sure if specific to nix-darwin (might be a general nixos problem) but having my config in /etc/nix-darwin is pretty annoying in a multi-user setup because i can't easily edit it from different user accounts??? mostly because git really doesn't keep g=u permissions on the files (or maybe its jj but i doubt it)
so im thinking instead of fighting git, which really isn't made for having multiple users share the same repositories, i might just keep a separate clone of my config in ~/.config/nix-darwin for each user?? is this what people do | 17:43:59 |
theutz | Curiously, why wouldn't you use something like Home Manager to manager per-user settings? | 17:46:35 |
Randy Eckenrode | I reference my flake by URI. | 17:47:14 |
Randy Eckenrode | So darwin-rebuild switch --flake github:reckenrode/nixos-configs. | 17:47:51 |
nasso | oh i do use home-manager for that, it also lives in /etc/nix-darwin though, is that wrong??? | 17:48:18 |
theutz | * Curiously, why wouldn't you use something like Home Manager to manager per-user settings? Sorry, misunderstood the question. Randy is right. 🙂 | 17:48:20 |
Randy Eckenrode | The repo is the source of truth for my flake. If I need to test something, I point darwin-rebuild at my local clone. | 17:48:48 |
nasso | oh interesting | 17:49:09 |
nasso | thats pretty smart | 17:49:13 |
nasso | you still have a lockfile though right? | 17:49:33 |
nasso | or does it just use the lockfile from the repo without creating another one | 17:49:48 |
nasso | oh yeah | 17:49:50 |
Randy Eckenrode | I do. I have a GitHub Action that bumps it nighly. | 17:49:55 |
Randy Eckenrode | * | 17:50:02 |
nasso | okay thats cool i kinda wanna do that now | 17:50:11 |
Randy Eckenrode | Oh, sorry. The lockfile is in the repo. | 17:50:19 |
nasso | yeah and darwin-rebuild doesn't need to create any local lockfile cuz its just using the one from the repo | 17:50:45 |
nasso | holy shit i just had an idea | 17:51:40 |
nasso | could i do something like:
a nasso/nixos-config flake with my system-wide configuration, no home-manager, nothing user-specific a nasso/nixos-config-personal flake, pulls nasso/nixos-config, adds my personal home-manager config and has primaryUser = "nasso", and when i darwin-switch it only affects my personal user account a nasso/nixos-config-work flake (in a private repo), pulls nasso/nixos-config, adds my home-manager config for my work user account, it sets primaryUser = "<work account username>", and when i darwin-switch it only affects that user account | 17:57:52 |
nasso | this would let me make eveyrthing public except for nasso/nixos-config-work, which i dont necessarily want to share (yet) | 17:59:10 |
nasso | and this sounds very modular and cool but idk i never seen any setup like that | 17:59:29 |
Randy Eckenrode | That should work, but your source flake will need to export your config in a way the other flakes can consume it. | 17:59:31 |
nasso | yea | 17:59:37 |
nasso | it wouldn't necessarily be usable as a standalone nixos config, i might name it something like nasso/nixos-config-base or something idk | 18:00:21 |
Randy Eckenrode | Personally, I’d just export it as a module you could enable in the dependent flakes. I’m not sure what the state of the art is for flake reuse because I don’t particularly like frameworks like that. | 18:00:33 |
nasso | oh yeah You're Absolutely Right | 18:00:58 |