1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
nix-darwin/modules/services
Vincent Haupert 06f5dab065 github-runners: adapt to NixOS module
While #859 added basic support for configuring GitHub runners through
nix-darwin, it did not yet support all of the options the NixOS module
offers.

I am aware that this is a rather big overhaul. I think, however, that
it's worth it:

- Copies the `options.nix` from the [NixOS module] with only minor
  adaptations. This should help to keep track of any changes to it.
- Respect the `workDir` config option. So far, the implementation didn't
  even read the value of the option.
- Allow configuring a custom user and group.
  If both are `null`, nix-darwin manages the `_github-runner` user
  shared among all instances. Take care of creating your own users if
  that's not what you want.
- Also creates the necessary directories for state, logs and the working
  directory (unless `workDir != null`). It uses the following locations:
    * state: `/var/lib/github-runners/${name}`
    * logs: `/var/log/github-runners/${name}`
    * work: The value of `workDir` or `/var/run/github-runners/${name}`
            if (`workDir == null`).
  We have to create the logs directory before starting the service since
  launchd expects that the `Standard{Error,Out}Path` exist. We do this
  by prepending to [`system.activationScripts.launchd.text`].
  All directories belong to the configured `user` and `group`.
- Warn if a `tokenFile` points to the Nix store.

[NixOS module]: https://github.com/NixOS/nixpkgs/blob/3c30c56/nixos/modules/services/continuous-integration/github-runner/options.nix
[`system.activationScripts.launchd.text`]: https://github.com/LnL7/nix-darwin/blob/bbde06b/modules/system/launchd.nix#L99-L123
2024-02-28 09:40:25 +01:00
..
activate-system etc: check for existing files during checks stage 2023-07-16 12:15:07 +01:00
github-runner github-runners: adapt to NixOS module 2024-02-28 09:40:25 +01:00
hercules-ci-agent treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
karabiner-elements treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
khd treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
kwm treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
mail treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
monitoring treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
nextdns treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
nix-gc Fix spelling 2023-07-10 08:30:15 -04:00
ofborg fix: correct description of services.ofborg.logFile 2023-07-27 14:05:53 +10:00
postgresql treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
privoxy treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
redis treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
sketchybar sketchybar: init 2023-07-25 18:58:56 +08:00
skhd treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
spacebar treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
synergy treewide: fix mkEnableOption docs 2023-07-21 21:17:59 +01:00
yabai services/yabai: Remove IFD 2024-02-01 23:06:13 +01:00
autossh.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
buildkite-agents.nix Merge pull request #675 from serokell/rvem/update-buildkite-module 2023-06-25 10:52:13 +02:00
cachix-agent.nix Update modules/services/cachix-agent.nix 2023-07-12 16:46:02 +01:00
chunkwm.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
dnsmasq.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
emacs.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
eternal-terminal.nix eternal-terminal: enable keep alive 2023-07-24 20:44:49 -04:00
gitlab-runner.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
ipfs.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
lorri.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
mopidy.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
netbird.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
nix-daemon.nix Add security.pki.installCACerts config 2023-11-11 12:36:28 +01:00
spotifyd.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
synapse-bt.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00
tailscale.nix etc: use .before-nix-darwin instead of .orig 2023-07-12 08:35:36 +10:00
wg-quick.nix treewide: convert all option docs to Markdown 2023-06-24 10:48:55 +01:00