8.nix-darwin/modules
Emily c449918bfb homebrew: move to system activation
This adds an optional explicit `homebrew.user` option that allows users
to avoid setting `system.primaryUser`, partly as a proof of concept
of what the interfaces should look like in the future. Homebrew only
officially support one global installation, so a singleton matches
upstream’s expectations; in practice, it may be useful for us to
nest this into `users.users.*.homebrew` instead, at the expense of
being an unsupported setup if used to its full potential. Since
that would be a breaking change to the inteface anyway, I think
adding `homebrew.user` for now is acceptable. (I think one native
Apple Silicon and one Rosetta 2 Homebrew installation – under
`/opt/homebrew` and `/usr/local` respectively – may be exceptions
to this lack of upstream support, but that would be complicated to
support even with `users.users.*.homebrew`.)

I’m not entirely sure where in system activation this should
go. Probably after the user defaults and launch agents stuff, to match
the existing logic in user activation, and I lean towards doing it
as late as possible; too early and we might not have the users and
groups required to bootstrap a Homebrew installation set up, but
as Homebrew installations could be fiddly and fail, doing it in the
middle could leave a partially‐activated system.

Probably it should be done in a launch agent or something instead, but
this is my best guess as to the appropriate place for now. The downside
is that activation scripts generally won’t be able to assume that the
Homebrew prefix is populated according to the current configuration,
but they probably shouldn’t be depending on that anyway?
2025-05-16 16:29:17 +01:00
..
documentation Reapply "eval-config: set class" 2024-06-13 14:35:20 +01:00
environment {environment,readme}: default configuration path to /etc/nix-darwin 2025-01-27 23:10:14 +00:00
examples treewide: point to the new GitHub organization 2025-03-27 17:07:57 +00:00
fonts fonts: remove fonts.fontDir.enable 2024-06-13 11:56:58 +01:00
launchd feat: use wait4path with script launchd option 2024-09-22 15:30:21 +10:00
lib write-text: remove support for copy 2024-06-15 12:15:13 +01:00
misc services/dnscrypt-proxy: init 2025-02-28 19:58:19 +07:00
networking networking: allow users to override FQDN 2025-04-28 14:22:30 +10:00
nix Merge pull request #1400 from dwt/linux-builder-working-directory 2025-04-01 17:36:52 +09:00
power power: move the check for restartPowerfailure support to checks.nix 2024-12-29 12:13:54 +01:00
programs _1password{,-gui}: fix package not being used 2025-05-15 17:01:26 +10:00
security pam: add pam_watchid support 2025-02-25 23:51:30 +08:00
services Merge pull request #1442 from lheckemann/gitlab-runner-fix 2025-05-13 22:20:02 +10:00
system homebrew: move to system activation 2025-05-16 16:29:17 +01:00
time time: shellcheck fix 2024-11-05 11:12:21 +10:00
users fix: use correct username for profile 2025-03-10 19:55:24 +01:00
alias.nix Update def and implementation of nix.package to match NixOS module 2022-08-16 10:41:51 -07:00
homebrew.nix homebrew: move to system activation 2025-05-16 16:29:17 +01:00
meta.nix treewide: remove lib.mdDoc 2024-04-19 04:05:50 +02:00
module-list.nix primary-user: init 2025-05-16 16:29:17 +01:00