2022-10-21 18:38:19 +00:00
|
|
|
{ config
|
|
|
|
, pkgs
|
|
|
|
, lib
|
|
|
|
, ...
|
|
|
|
}@args:
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
with lib;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
let
|
|
|
|
cfg = config.services.github-runner;
|
|
|
|
in
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
{
|
|
|
|
options.services.github-runner = import ./github-runner/options.nix (args // {
|
|
|
|
# Users don't need to specify options.services.github-runner.name; it will default
|
|
|
|
# to the hostname.
|
|
|
|
includeNameDefault = true;
|
|
|
|
});
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2022-10-21 18:38:19 +00:00
|
|
|
services.github-runners.${cfg.name} = cfg;
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
}
|