1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
nix-darwin/tests
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
..
activation-scripts.nix activation-scripts: add test for pre/post hooks 2018-01-14 16:08:27 +01:00
autossh.nix port autossh service from nixos 2019-07-02 10:44:34 -04:00
checks-nix-gc.nix tests: fix uses of ! 2023-08-05 23:30:16 +01:00
environment-path.nix users.users: only extend profiles if packages are defined 2019-02-23 12:00:39 +01:00
environment-terminfo.nix Type: TERMINFO_DIRS not TERMINFO 2022-10-20 14:49:26 -06:00
fonts.nix fix: adapt fonts tests to use newer module api 2022-09-15 20:26:54 +02:00
homebrew.nix Add somes tests for homebrew module 2022-08-30 13:30:05 -07:00
launchd-daemons.nix launchd: add basic test for daemons/agents 2019-03-22 20:49:53 +01:00
launchd-setenv.nix launchd: add test for envVariables 2017-05-14 00:43:45 +02:00
networking-hostname.nix Add separate options for ComputerName, HostName, and LocalHostName 2020-08-31 21:01:47 -07:00
networking-networkservices.nix networking: rename networkservices -> knownNetworkServices 2018-01-13 02:13:51 +01:00
networking-shell-escape.nix fix shell escaping in networking config 2024-01-19 12:16:32 -05:00
nixpkgs-overlays.nix tests: fix uses of ! 2023-08-05 23:30:16 +01:00
programs-ssh-empty-known-hosts.nix programs.ssh: write ssh known_hosts only if there are any set 2023-09-15 08:24:20 -07:00
programs-ssh.nix ssh: fix public keys in home directory not working 2023-06-08 15:44:07 +10:00
programs-tmux.nix tmux: add test for #173 2019-11-02 17:18:39 +01:00
programs-zsh.nix add escape to shell aliases 2022-06-30 19:21:36 +02:00
security-pki.nix security.pki: add test for ca-certificates.crt 2019-01-15 22:14:56 +01:00
services-activate-system-changed-label-prefix.nix launchd: allow customization of the default launchd prefix 2020-04-14 15:01:37 -07:00
services-activate-system.nix add test for activate-system service 2017-05-14 01:31:22 +02:00
services-buildkite-agent.nix buildkite-agent: update module 2023-05-10 16:26:20 +08:00
services-dnsmasq.nix fix: use separate config option to set port of DNSmasq 2021-01-28 14:09:30 +01:00
services-eternal-terminal.nix eternal-terminal: add module 2023-07-23 08:20:28 -04:00
services-github-runners.nix github-runners: adapt to NixOS module 2024-02-28 09:40:25 +01:00
services-lorri.nix add git, gnutar and gzip to lorri's path 2020-11-05 11:43:50 +01:00
services-nextdns.nix nexdns: add module and tests 2020-11-27 11:28:26 +09:00
services-nix-daemon.nix tests: fix uses of ! 2023-08-05 23:30:16 +01:00
services-nix-gc.nix tests: fix uses of ! 2023-08-05 23:30:16 +01:00
services-ofborg.nix ofborg: add basic test 2018-03-05 23:00:50 +01:00
services-offlineimap.nix Fix args passing to execvp 2018-08-01 19:40:59 +02:00
services-privoxy.nix Add a privoxy service 2018-08-02 10:09:22 +10:00
services-redis.nix Add some test coverage for redis service 2020-11-02 19:26:39 -08:00
services-skhd.nix skhd: add basic test 2018-03-05 21:41:52 +01:00
services-spacebar.nix module: add spacebar service 2020-05-14 19:41:28 +01:00
services-spotifyd.nix spotifyd: add spotifyd service 2021-03-11 04:20:00 +00:00
services-synapse-bt.nix synapse-bt: Add basic test 2018-09-15 15:37:22 -05:00
services-synergy.nix synergy: Add tests for config options 2018-09-14 21:01:08 +10:00
services-yabai.nix Separate yabai config and extra config by newline 2020-05-15 15:38:57 -04:00
sockets-nix-daemon.nix tests: fix uses of ! 2023-08-05 23:30:16 +01:00
system-defaults-write.nix Adding test 2024-01-02 22:58:18 -10:00
system-environment.nix Combine system environment tests and add zsh 2018-10-29 09:12:20 +09:00
system-keyboard-mapping.nix add new option - system.keyboard.swapLeftCommandAndLeftAlt 2020-10-23 22:47:38 +08:00
system-packages.nix system-packages: fix test 2019-01-18 23:36:15 +01:00
system-path.nix Unify environment configuration and don't run in child shells 2018-10-25 01:00:52 +09:00
system-shells.nix add test for environment.shells 2017-12-13 23:05:46 +01:00
users-groups.nix fix: set shell for new users, and only known ones 2024-01-20 11:03:15 -05:00
users-packages.nix users.users: only extend profiles if packages are defined 2019-02-23 12:00:39 +01:00