2022-11-20 16:00:00 +03:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.github-runners."a-runner" = {
|
|
|
|
enable = true;
|
|
|
|
url = "https://github.com/nixos/nixpkgs";
|
2024-02-28 11:40:25 +03:00
|
|
|
tokenFile = "/secret/path/to/a/github/token";
|
|
|
|
# We need an overridable derivation but cannot use the actual github-runner package
|
|
|
|
# since it still relies on Node.js 16 which is marked as insecure.
|
|
|
|
package = pkgs.hello;
|
2022-11-20 16:00:00 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
test = ''
|
|
|
|
echo >&2 "checking github-runner service in /Library/LaunchDaemons"
|
|
|
|
grep "org.nixos.github-runner-a-runner" ${config.out}/Library/LaunchDaemons/org.nixos.github-runner-a-runner.plist
|
2024-02-28 11:40:25 +03:00
|
|
|
grep "<string>_github-runner</string>" ${config.out}/Library/LaunchDaemons/org.nixos.github-runner-a-runner.plist
|
2022-11-20 16:00:00 +03:00
|
|
|
|
|
|
|
echo >&2 "checking for user in /activate"
|
|
|
|
grep "GitHub Runner service user" ${config.out}/activate
|
|
|
|
'';
|
|
|
|
}
|