Commit graph

289 commits

Author SHA1 Message Date
zowoq
36fed93cf5 fold -> foldr
deprecated in f4d36941eb
2025-11-26 19:41:19 +10:00
Wigger Boelens
682de76b1e
dnsmasq: make the daemon wait for the nix store to be mounted
This resolves the issue of the daemon not starting because the nix store is not yet mounted

Signed-off-by: Wigger Boelens <me@wigger.email>
2025-11-03 15:54:39 +01:00
Wigger Boelens
1204e79a1e
dnsmasq: add servers option for upstream DNS configuration
Adds a new `services.dnsmasq.servers` option to configure upstream DNS servers. This allows users to specify which DNS servers dnsmasq should forward queries to, supporting domain-specific routing and custom ports.
When empty (default), dnsmasq uses servers from /etc/resolv.conf.

Signed-off-by: Wigger Boelens <me@wigger.email>
2025-10-17 13:05:13 +02:00
Nelson Tam
a9f953b682
aerospace: add option for colemak key-mapping 2025-10-13 17:02:03 +11:00
Michael Hoang
c48e963a55
telegraf: set HOME to avoid crash at startup (#1598)
Some checks failed
Test / test-stable (push) Has been cancelled
Test / install-against-stable (push) Has been cancelled
Test / install-flake (push) Has been cancelled
Update website / Build (push) Has been cancelled
Update website / Deploy (push) Has been cancelled
2025-09-25 13:02:32 +00:00
Jörg Thalheim
49eedd3d2a telegraf: set HOME to avoid crash at startup
https://github.com/nix-community/infra/pull/1982
2025-09-25 09:14:03 +02:00
Michael Hoang
15f067638e
github-runner: fix the nodeRuntimes option (#1582) 2025-09-06 03:54:02 +00:00
Michael Hoang
d7c9b35913
github-runner: add support for node24 (#1573) 2025-09-06 03:51:15 +00:00
Sander
f910ac37b6
github-runner: fix the nodeRuntimes option
The conditional override was intended to be backwards-compatible with older runner packages without the `nodeRuntimes` argument.
However, `override` doesn't yield default arguments, so the override was never applied.

This commit removes the conditional entirely since `nodeRuntimes` was added back in 24.05.
2025-08-28 12:51:30 +02:00
Sander
7d6644bdb6
github-runner: add support for node24 2025-08-18 16:45:51 +02:00
Linnnus
66911b7d16 Remove manual escaping 2025-07-01 21:04:57 +02:00
Tom McLaughlin
7f9694a4be github-runner/service.nix: fix missing argument in workDir assertion 2025-06-29 13:43:52 -07:00
squat
e09c1aefe4
feat(services.openssh): add extraConfig option
Same interface as in NixOS: https://search.nixos.org/options?channel=unstable&show=services.openssh.extraConfig&from=0&size=50&sort=relevance&type=packages&query=services.openssh.extraConfig
This is useful to customize the behavior of the SSH daemon, e.g. to add
options like `StreamLocalBindUnlink yes` to improve gpg-agent
forwarding.

Signed-off-by: squat <lserven@gmail.com>
2025-05-22 20:22:47 +02:00
Emily
7e5c6f7e21 etc: merge etcChecks into checks
The `activate-system` daemon will now run all the checks, which seems
like probably a good idea anyway?
2025-05-16 16:34:31 +01:00
Emily
051283a895 {activation-scripts,activate-system}: purify environment again 2025-05-16 16:34:31 +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
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
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
113883e37d
Merge pull request #1388 from ivankovnatsky/master
services/netdata: add cacheDir option
2025-04-09 20:44:32 +02:00
‮rekcäH nitraM‮
fe728cfb5a autossh: Fix incorrect reference to systemd
Darwin has LaunchD.
2025-03-23 08:39:49 +01: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
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
Niklas Ravnsborg
feecfd97cd
update nextdns to use command instead of serviceConfig.ProgramArguments 2025-03-12 15:52:45 +01:00
Andrew Marshall
fdc512d107 services/dnscrypt-proxy: Fix use of pkg alias
`dnscrypt-proxy2` is just an alias for `dnscrypt-proxy`. Use that and
avoid eval failures when Nixpkgs is configured with `allowAliases =
false`.
2025-03-03 08:13:33 -05:00
r17x
7386d8878e
services/dnscrypt-proxy: init 2025-02-28 19:58:19 +07:00
Emily
731910af01 {activation-scripts,activate-system}: check gcroots before linking
When `nix.enable` is off, we don’t necessarily have an active
Nix installation, so there won’t necessarily be an active
`/nix/var/nix/gcroots` directory to link things into. NixOS just skips
this unconditionally when `nix.enable` is off, but that doesn’t
work well with a context in which we usually expect `nix.enable`
to be coupled with an unmanaged system installation of Nix.
2025-02-11 20:10:55 +00:00
Emily
42e16f31c6 cachix-agent: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
e3bde1588b github-runner: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
f4e2805e19 ofborg: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
aba0c60eba lorri: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
57c93ffe6c hercules-ci-agent: check for nix.enable 2025-02-11 20:10:55 +00:00
Emily
0176a5082b nix-optimise: check for nix.enable
This was added to Nixpkgs in eb8b70c020e6693b29634660fa173d7f14f882eb.
2025-02-11 20:10:55 +00:00
Emily
fc9367a9ec nix-gc: check for nix.enable
This was added to Nixpkgs in eb8b70c020e6693b29634660fa173d7f14f882eb.
2025-02-11 20:10:55 +00:00
Emily
8a94b5b99b nix-daemon: remove services.nix-daemon.enable
We now manage the launchd daemon unconditionally when we manage the
Nix installation.
2025-02-07 19:44:59 +00:00
Emily
c796587d2e nix: remove nix.useDaemon
We now assume the daemon is used unconditionally when we manage the
Nix installation.

The `nix.gc` and `nix.optimise` services lose their `$NIX_REMOTE`
setting rather than making it unconditional, as the NixOS `nix.gc`
module does not set it. Possibly it should, but I think uniformity
between the two systems is better than diverging, even though I kind
of hate that the non‐daemon method of access is even a thing.
2025-02-07 19:44:59 +00:00
Emily
e182d8dff6 nix: add nix.enable option to disable Nix management
This is an equivalent of the `nix.enable` option from NixOS
and Home Manager. On NixOS, it mostly serves to allow building
fixed‐configuration systems without any Nix installation at
all. It should work for that purpose with nix-darwin too, and the
implementation is largely the same, but the main use case is more
similar to the Home Manager option: to allow the use of nix-darwin
with an unmanaged system installation of Nix, including when there
is another service expecting to manage it, as with Determinate.

By providing an escape hatch to opt out of Nix management entirely,
this will also allow us to consolidate and simplify our existing Nix
installation management, by being more opinionated about things like
taking ownership of the daemon and the build users. Porting one option
from NixOS lets us drop two that only ever existed in nix-darwin and
reduce overall complexity.
2025-02-07 19:44:59 +00:00
Emily
cc9c8408bb Revert "{activation-scripts,activate-system}: purify environment"
This shouldn’t actually be split out from the Plan because of the
current use of `$HOME` in the defaults for channel‐based setups.

This reverts commit 4bff4bc8ae.
2025-01-28 02:31:59 +00:00
Emily
4bff4bc8ae {activation-scripts,activate-system}: purify environment
This ensures that system activation does not depend on various
details of its process environment, ensuring uniformity across various
invocation contexts and with the `activate-system` daemon. This becomes
more important in a post‐user‐activation world to avoid problematic
dependencies like `$SUDO_USER`, but is a good idea in general.

The `sudoers(5)` defaults on my Sequoia system are:

    Defaults	env_reset
    Defaults	env_keep += "BLOCKSIZE"
    Defaults	env_keep += "COLORFGBG COLORTERM"
    Defaults	env_keep += "__CF_USER_TEXT_ENCODING"
    Defaults	env_keep += "CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE"
    Defaults	env_keep += "LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME"
    Defaults	env_keep += "LINES COLUMNS"
    Defaults	env_keep += "LSCOLORS"
    Defaults	env_keep += "SSH_AUTH_SOCK"
    Defaults	env_keep += "TZ"
    Defaults	env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
    Defaults	env_keep += "EDITOR VISUAL"
    Defaults	env_keep += "HOME MAIL"

Of these preserved environment variables, the ones that are set in
practice when I run `sudo env` that aren’t set in the activation
script here are:

* `$COLORTERM`
* `$DISPLAY`
* `$EDITOR`
* `$MAIL`
* `$SSH_AUTH_SOCK`
* `$TERM`
* `$__CF_USER_TEXT_ENCODING`

Most of these seem either pointless or actively harmful to set for
the purpose of the system activation script.

This will mean that tools run during activation won’t print output
in the user’s preferred language, but that’s probably the right
trade‐off overall, as that is likely to break activation scripts
that parse command output anyway.
2025-01-27 22:31:15 +00:00
Emily
0e87d3d391 activate-system: don’t KeepAlive
It seems like a bad idea to keep restarting the activation daemon
when it fails.
2025-01-27 22:31:15 +00:00
Michael Hoang
be4c1b897a openssh: init module 2025-01-10 10:23:09 +11:00
thuvasooriya
aefd56bb56
aerospace: add workspace-to-monitor-force-assignment option and fix on-window-detected type #1208
trying to fix #1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

aerospace: add workspace-to-monitor-force-assignment option and fix
on-window-detected type #1208

trying to fix #1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

error

formatting mishap

space left

small fix

formatting mishaps
2024-12-29 16:57:26 +05:30
Michael Hoang
8752b6ae3c github-runner: add instructions for triggering a runner registration 2024-12-07 13:08:55 +11:00
Michael Hoang
22cde06f49 github-runner: fix service not starting 2024-12-07 13:06:22 +11:00
Michael Hoang
06e1d77068 github-runner: use lib.getExe{,'} 2024-12-07 13:01:21 +11:00
Michael Hoang
d8255f09da github-runner: remove with lib; 2024-12-07 12:54:17 +11:00
z0al
9a59556018
fix(aerospace): allow startup commands 2024-12-04 19:03:03 +00:00
Michael Hoang
caa23e878f github-runner: make umask quiet 2024-11-22 11:19:46 +11:00
Michael Hoang
698414e409 nix-daemon: enable by default
Single user installs have been unsupported by the official Nix installer
since 2.4.
2024-11-16 23:19:11 +11:00
Michael Hoang
d2498644fd nix-daemon: remove with lib; 2024-11-16 23:19:11 +11:00