2024-05-31 14:41:47 -04:00
|
|
|
{
|
|
|
|
|
lib,
|
|
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
with lib;
|
|
|
|
|
with lib.custom; let
|
|
|
|
|
cfg = config.services.gh;
|
|
|
|
|
|
|
|
|
|
sec = config.age.secrets;
|
2024-06-02 11:02:44 -04:00
|
|
|
group = config.services.github-runners.pluto.runnerGroup;
|
2024-05-31 14:41:47 -04:00
|
|
|
in {
|
|
|
|
|
options.services.gh = with types; {
|
|
|
|
|
enable = mkBoolOpt false "Enable GitHub Actions Runner";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
age.secrets = {
|
|
|
|
|
github_runner = {
|
|
|
|
|
file = ./sec/github_runner.age;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-06-02 11:02:44 -04:00
|
|
|
services.github-runners.pluto = {
|
2024-05-31 14:41:47 -04:00
|
|
|
enable = true;
|
|
|
|
|
url = "https://github.com/zackartz/nixos-dots";
|
|
|
|
|
tokenFile = sec.github_runner.path;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|