Commit graph

2156 commits

Author SHA1 Message Date
Emily
f47b8062cb defaults: move userDefaults to system activation 2025-05-16 16:31:17 +01:00
Emily
7877cba5f5 launchd: move userLaunchd to system activation
I’m not *completely* certain that this handles user agents
correctly. There is a deprecated command, `launchctl asuser`, that
executes a command in the Mach bootstrap context of another user`.
<https://scriptingosx.com/2020/08/running-a-command-as-another-user/>
claims that this is required when loading and unloading user agents,
but I haven’t tested this. Our current launchd agent logic is pretty
weird and broken already anyway, so unless this actively regresses
things I’d lean towards keeping it like this until we can move
over entirely to `launchctl bootstrap`/`launchctl kickstart`, which
aren’t deprecated and can address individual users directly. Someone
should definitely test it more extensively than I have, though.
2025-05-16 16:29:17 +01:00
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
Emily
52ee8c57c2 primary-user: init 2025-05-16 16:29:17 +01:00
Michael Hoang
8817b00b00
defaults: add com.apple.iCal for managing Calendar.app (#1446) 2025-05-16 13:12:40 +10:00
Michael Hoang
14737a9676 defaults: add com.apple.iCal for managing Calendar.app 2025-05-16 12:52:49 +10:00
Michael Hoang
b6fff20c69
defaults: update docs for AppleInterfaceStyle (#1445) 2025-05-15 18:28:21 +10:00
Michael Hoang
d693997a32 defaults: update docs for AppleInterfaceStyle
Eventually we should implement a special type that allows deleting
values.
2025-05-15 18:02:47 +10:00
Michael Hoang
f0fbf2dbe7
_1password{,-gui}: fix package not being used (#1444) 2025-05-15 17:29:56 +10:00
Michael Hoang
f2753a4ca6 _1password{,-gui}: fix package not being used 2025-05-15 17:01:26 +10:00
Michael Hoang
f88be00227
Merge pull request #1442 from lheckemann/gitlab-runner-fix
gitlab-runner: write config as toml, don't clobber existing file
2025-05-13 22:20:02 +10:00
Sam
d642c98560
Merge pull request #1439 from dermetfan/buildkite-multi-tags 2025-05-12 10:07:22 -07:00
Linus Heckemann
4cabc9c286 gitlab-runner: write config as toml, don't clobber existing file
The previous command would fail because of datetimes not being
representable as JSON, wiping the config entirely because of the
`sponge` invocation that doesn't care whether the program piped in
fails.
2025-05-12 13:17:31 +02:00
Robin Stumm
846444354b services/buildkite-agents: support multi-tags 2025-05-12 12:59:13 +02:00
Michael Hoang
6cb36e8327
Merge pull request #1438 from Enzime/push-qztkxuoksrpv
programs/_1password{,-gui}: init modules
2025-05-08 22:50:54 +10:00
Michael Hoang
c36b57f219 programs/_1password-gui: init module 2025-05-08 20:17:13 +10:00
Michael Hoang
24c2d2bab7 programs/_1password: init module 2025-05-08 20:16:50 +10:00
Michael Hoang
760a11c870
Merge pull request #1432 from WHForks/replacevars
nix-tools: use replaceVarsWith
2025-05-03 16:49:02 +10:00
WeetHet
a6d73d0904 nix-tools: use replaceVarsWith 2025-05-01 18:24:30 +03:00
Michael Hoang
4515dacafb
Merge pull request #1425 from Enzime/push-luyktrtqqskl
networking: allow users to override FQDN
2025-04-28 14:58:41 +10:00
Michael Hoang
9603417da1 networking: allow users to override FQDN
Backport of https://github.com/NixOS/nixpkgs/pull/391522
2025-04-28 14:22:30 +10:00
Michael Hoang
43975d782b
Merge pull request #1423 from Enzime/push-kpkrwzkroylt
networking: backport `domain`, `fqdn` and `fqdnOrHostName` options
2025-04-12 19:29:39 +02:00
Michael Hoang
751a96bc1f networking: backport domain, fqdn and fqdnOrHostName options
f675531bc7/nixos/modules/tasks/network-interfaces.nix (L580-L618)
2025-04-12 19:11:10 +02:00
Michael Hoang
113883e37d
Merge pull request #1388 from ivankovnatsky/master
services/netdata: add cacheDir option
2025-04-09 20:44:32 +02:00
Michael Hoang
73d59580d0
Merge pull request #1400 from dwt/linux-builder-working-directory
Linux builder: working directory rename and cleanup
2025-04-01 17:36:52 +09:00
Michael Hoang
1b8d711826 linux-builder: format 2025-04-01 17:09:49 +09:00
‮rekcäH nitraM‮
b8939c4fe4 linux-builder: remove /nix/store external directory when disabled
When /nix/store internal directories get renamed, they just don't get
into the next version of your system closure and are thus no problem to
rename. But state in the system is a problem, as there is no process to
remov eit. Thus we need to do it ourselves.
2025-04-01 17:09:19 +09:00
‮rekcäH nitraM‮
a175c68f3f linux-builder: upgrade working directory
The working directory was still using an old name of the project, which
made it uneccessary hard to understand why that directory was used
exactly.
2025-04-01 17:07:02 +09:00
Michael Hoang
eaff8219d6
Merge pull request #1410 from Enzime/push-kklymxxksrnp
nix-tools: re‐add `nixPackage`
2025-03-31 00:54:11 +09:00
Emily
e7bd2f8f2f nix-tools: re‐add nixPackage
(With some tweaks to handle `nix.enable` and order it at a more
sensible position in the `$PATH`.)

The installers actually install Nix into `root`’s profile for some
reason, which means that the path’s prioritization backfires when
the script runs as root and we’re managing the Nix installation. When
running `darwin-rebuild` as a normal user, this wasn’t a problem.

Maybe we should just have a check to make sure there’s no conflicting
Nix in `root`’s profile – it seems pretty bad for `root` to
get the wrong Nix – but it would trigger for almost everyone,
which seems kind of annoying. I guess we could automatically
remove it from `root`’s profile if it matches what’s in
`/nix/var/nix/profiles/default`…

This reverts commit 02232f71c5.
2025-03-31 00:34:55 +09:00
Emily
53d0f0ed11
Merge pull request #1407 from emilazy/push-xktutyxmrvks
website: try to fix
2025-03-29 04:17:53 +00:00
Emily
75a7fb885d website: try to fix redirect
It seems like the `#readme` is getting stripped after load, maybe
because of the `?tab=…` stuff. Hoping this will fix it.
2025-03-29 04:13:33 +00:00
Emily
516590cf12 website: fix manual path 2025-03-29 04:13:00 +00:00
Emily
feb64b5364
Merge pull request #1406 from emilazy/push-nwzyqrynuvyo
ci: deploy the website from GitHub Actions
2025-03-29 04:10:02 +00:00
Emily
2c77fdbfba ci: deploy the website from GitHub Actions 2025-03-28 19:44:24 +00:00
Emily
a5af2a5b22 readme: use logo from GitHub attachments
Avoids churn for now while moving around site stuff.
2025-03-28 17:05:16 +00:00
Michael Hoang
75f8e4dbc5
Merge pull request #1403 from emilazy/push-wqyxrrzkzovy
treewide: point to the new GitHub organization
2025-03-28 10:27:21 +09:00
Emily
ce5a3b9db9 treewide: point to the new GitHub organization 2025-03-27 17:07:57 +00:00
Emily
000c40f4fe readme: update contact information 2025-03-27 17:07:57 +00:00
Michael Hoang
bb81755a36
Merge pull request #920 from hiroqn/master
Expose `extendModules` attr
2025-03-25 11:27:55 +09:00
hiroqn
2c563bd049 expose extendModules 2025-03-25 11:00:38 +09:00
Emily
ebb88c3428
Merge pull request #1374 from dwt/fix-docs
Docs: Fix wrong reference to systemd
2025-03-23 14:58:55 +00:00
‮rekcäH nitraM‮
fe728cfb5a autossh: Fix incorrect reference to systemd
Darwin has LaunchD.
2025-03-23 08:39:49 +01:00
Emily
e9f41de2a8
Merge pull request #1375 from dwt/fix-docs-2
Docs: Fix references to NixOS
2025-03-21 22:10:55 +00:00
Michael Hoang
2d9b633169
Merge pull request #1331 from isabelroses/tools
feat: system tools can be configured individually
2025-03-19 17:35:36 +09:00
Ivan Kovnatsky
5417dfd58c
services/netdata: add cacheDir option
For me netdata could not start:

```logs
time=2025-03-18T21:27:21.023+02:00 comm=netdata source=daemon level=info errno="2, No such file or directory" tid=257369  msg="CONFIG: cannot load cloud config '/var/lib/netdata/cloud.d/cloud.conf'. Running with internal defaults."
time=2025-03-18T21:27:21.024+02:00 comm=netdata source=daemon level=alert errno="2, No such file or directory" tid=257369  msg="Cannot create required directory '/var/cache/netdata'"
0   netdata                             0x0000000104845cb0 netdata_logger_fatal + 356
1   netdata                             0x00000001044d8734 verify_or_create_required_directory + 84
2   netdata                             0x00000001044d718c set_global_environment + 524
3   netdata                             0x00000001044db294 netdata_main + 1920
4   netdata                             0x00000001044dd178 main + 12
5   dyld                                0x0000000184394274 start + 2840
```
2025-03-18 22:13:30 +02:00
Michael Hoang
95eac71bf5
Merge pull request #1386 from Enzime/push-lnuotyxsytkz
Back out "github-runner: replace `mkdir -p -m` with `umask`"
2025-03-17 07:58:43 +09:00
Michael Hoang
7b4a4951dc Back out "github-runner: replace mkdir -p -m with umask"
This backs out commit 3b738c765d.

Setting a `umask` made the parent directory have too conservative of
permissions making it so `_github-runner` couldn't access the child
directories.
2025-03-16 19:31:31 +09:00
isabel
9951b44d5b
nix-darwin: system tools can be configured indvidually 2025-03-15 09:24:22 +00:00
Michael Hoang
9175b4bb5f
Merge pull request #1377 from zhaofengli/fix-custom-user-preferences-merging
Fix merging of system.defaults.CustomUserPreferences
2025-03-15 13:46:20 +09:00