add github_runner
This commit is contained in:
parent
f784bb8866
commit
d76a7b146b
4 changed files with 59 additions and 10 deletions
32
modules/nixos/services/gh/default.nix
Normal file
32
modules/nixos/services/gh/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.custom; let
|
||||
cfg = config.services.gh;
|
||||
|
||||
sec = config.age.secrets;
|
||||
group = config.services.github-runner.runnerGroup;
|
||||
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;
|
||||
group = group;
|
||||
};
|
||||
};
|
||||
|
||||
services.github-runner = {
|
||||
enable = true;
|
||||
url = "https://github.com/zackartz/nixos-dots";
|
||||
tokenFile = sec.github_runner.path;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue