Commit graph

13 commits

Author SHA1 Message Date
h7x4 0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Vincent Haupert 388bfcef4a nixos/github-runners: add nodeRuntimes option 2023-08-22 15:52:35 +02:00
Profpatsch d316c28a30 modules/github-runner: Improve tokenFile docs
We’ve been having trouble figuring out which kind of token to use and
why our setup would break every few system updates.

This should clarify which options there are, and which ones lead to
better results.

Ideally there would be a manual section that has a step-by-step guide
on how to set up the github runner, with screenshots and everything.
2023-02-23 12:37:30 +01:00
Vincent Haupert 66dbf9b199 nixos/github-runners: use mkMerge for serviceConfig
The `serviceOverrides` module option is commonly used to loosen the
systemd unit's hardening. This commit merges the `serviceConfig` with
`mkMerge` instead of using the update operator `//` which discards all
existing values on conflict. To avoid a breaking change which requires
defining each option with a higher priority (e.g., through `mkForce`),
this commit prefixes hardening values with `mkDefault`.

Notable exceptions are list hardening options which use `mkBefore`
instead of `mkDefault`. This allows for easy extension of the existing
settings. Resetting redefinitions are still possible through `mkForce`.
2023-01-09 09:36:04 +01:00
Alex Martens 307730fb72 nixos/github-runner: add workDir option 2023-01-03 19:54:25 -08:00
figsoda 6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Vincent Haupert ea8cf2e486 nixos/github-runners: support fine-grained personal access tokens
Add support for GitHub's new fine-grained personal access tokens [1]. As
opposed to the classic PATs, those start with `github_pat_` instead of
`ghp_`.

Make sure to use a token which has read and write access to the
"Administration" resource group [2] to allow for registrations of new
runners.

[1] https://github.blog/2022-10-18-introducing-fine-grained-personal-access-tokens-for-github/

[2] https://docs.github.com/en/rest/overview/permissions-required-for-github-apps#administration
2022-10-19 13:50:34 +02:00
Tom McLaughlin c2cc9aeafd Use config name by default, falling back to attr name 2022-10-19 03:33:30 -07:00
Tom McLaughlin 2c099d1a14 Set runner name to attr name for github-runners.${name} 2022-10-17 00:01:04 -07:00
Tom McLaughlin 9a7f38040b Fix user type 2022-10-11 06:04:25 -06:00
Tom McLaughlin b3de807a6a Update descriptions to use lib.mdDoc 2022-10-11 06:04:25 -06:00
Tom McLaughlin f13759e21f Fix a deprecated types.string -> types.str 2022-10-11 06:04:25 -06:00
Tom McLaughlin 998083f2ad github-runner: configurable user, environment, service overrides + multiple runners 2022-10-11 06:04:21 -06:00