!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1176 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org192 Servers

Load older messages


SenderMessageTime
26 Mar 2026
@k900:0upti.meK900Well that was great16:30:34
@k900:0upti.meK900It almost finished building on the community builder16:30:50
@k900:0upti.meK900And my connection dropped16:30:53
@nasso:matrix.orgnasso 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:matrix.orgnasso 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:matrix.orgtheutzCuriously, why wouldn't you use something like Home Manager to manager per-user settings?17:46:35
@reckenrode:matrix.orgRandy EckenrodeI reference my flake by URI.17:47:14
@reckenrode:matrix.orgRandy Eckenrode So darwin-rebuild switch --flake github:reckenrode/nixos-configs. 17:47:51
@nasso:matrix.orgnasso oh i do use home-manager for that, it also lives in /etc/nix-darwin though, is that wrong??? 17:48:18
@theutz:matrix.orgtheutz * 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
@reckenrode:matrix.orgRandy 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:matrix.orgnassooh interesting17:49:09
@nasso:matrix.orgnassothats pretty smart17:49:13
@nasso:matrix.orgnassoyou still have a lockfile though right?17:49:33
@nasso:matrix.orgnassoor does it just use the lockfile from the repo without creating another one17:49:48
@nasso:matrix.orgnassooh yeah17:49:50
@reckenrode:matrix.orgRandy EckenrodeI do. I have a GitHub Action that bumps it nighly.17:49:55
@reckenrode:matrix.orgRandy Eckenrode * 17:50:02
@nasso:matrix.orgnassookay thats cool i kinda wanna do that now17:50:11
@reckenrode:matrix.orgRandy EckenrodeOh, sorry. The lockfile is in the repo.17:50:19
@nasso:matrix.orgnasso 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:matrix.orgnassoholy shit i just had an idea17:51:40
@nasso:matrix.orgnasso could i do something like:
  1. a nasso/nixos-config flake with my system-wide configuration, no home-manager, nothing user-specific

  2. 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

  3. 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:matrix.orgnasso 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:matrix.orgnassoand this sounds very modular and cool but idk i never seen any setup like that17:59:29
@reckenrode:matrix.orgRandy EckenrodeThat 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:matrix.orgnassoyea17:59:37
@nasso:matrix.orgnasso 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
@reckenrode:matrix.orgRandy EckenrodePersonally, 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:matrix.orgnassooh yeah You're Absolutely Right18:00:58

Show newer messages


Back to Room ListRoom Version: 6