!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
12 Mar 2026
@axel_w:matrix.orgaxwyou can specify a target dir for each package23:14:35
@nasso:matrix.orgnasso 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
@nasso:matrix.orgnasso oh neat!
what would the target dir look like to install a cask named foo for user alice only?
23:19:40
@axel_w:matrix.orgaxwsee example conf here https://mynixos.com/nix-darwin/option/homebrew.casks23:28:01
@axel_w:matrix.orgaxw
{
    name = "foo";
    args = { appdir = "/Users/alice/Applications/
}
23:32:29
@axel_w:matrix.orgaxw *
{
    name = "foo";
    args = { appdir = "/Users/alice/Applications/"; };
}
23:35:32
@axel_w:matrix.orgaxwin homebrew.casks = [] instead of just foo23:36:54
@axel_w:matrix.orgaxw * in homebrew.casks = [] instead of just foo 23:37:33
13 Mar 2026
@nasso:matrix.orgnassooooh thank you so much01:33:48
@nasso:matrix.orgnasso ok so the idea is to literally put them in ~alice 01:34:36
@nasso:matrix.orgnassodidn't know that was possible! awesome01:34:51
@nasso:matrix.orgnasso 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 both

who 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
@nasso:matrix.orgnasso 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 both

who 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
@nasso:matrix.orgnasso (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
@sarahec:matrix.orgSarah ClarkHome-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 configurations03:15:49
@reckenrode:matrix.orgRandy Eckenrodee.g., here’s mine: https://github.com/reckenrode/nixos-configs03:57:39
@drag0n-rider:matrix.orgNikhil Snow changed their display name from nikhil to Nikhil Snow.05:56:58
@nasso:matrix.orgnassooh cool thanks! i will look into it!09:32:39
@toonn:matrix.orgtoonn 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
@nasso:matrix.orgnassoyeah for regular nix packages that seems easy10:14:08
@nasso:matrix.orgnassoi 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... sucky10:14:58
@emilazy:matrix.orgemilyon a multi user system, don't set it11:30:18
@emilazy:matrix.orgemilyHomebrew doesn't really support multiple installs unfortunately11:30:30
@nasso:matrix.orgnassoyeah i had a feeling i wasn't supposed to set it at all in this case11:31:05
@emilazy:matrix.orgemilyyou can assign a dedicated Homebrew admin user or have an unsupported per-user installation (but nix-darwin wouldn't manage those and HM doesn't have anything for it AFAIK)11:31:11
@emilazy:matrix.orgemilycombining nix-darwin and HM sounds like what you want l11:31:27
@emilazy:matrix.orgemily * 11:31:34
@emilazy:matrix.orgemilyprobably with the HM integration module for nix-darwin11:31:46
@emilazy:matrix.orgemilyshared stuff in nix-darwin, per-user in HM11:32:02
@nasso:matrix.orgnassohow would homebrew fit in this11:32:09

Show newer messages


Back to Room ListRoom Version: 6