MyNixOS website logo

Multiple GitHub Runners.

If user and group are set to null, the module will configure nix-darwin to manage the _github-runner user and group. Note that multiple runner configurations share the same user/group, which means they can access resources from other runners. Make each runner use its own user and group if this is not what you want. In this case, you will have to do the user and group creation yourself. If only user is set, while group is set to null, the service will infer the primary group of the user.

For each GitHub runner, the system activation script creates the following directories:

  • /var/lib/github-runners/<name>: State directory to store the runner registration credentials
  • /var/log/github-runners/<name>: The launchd service writes the stdout and stderr streams to this directory.
  • /var/run/github-runners/<name>: Working directory for workflow files. The runner only uses this directory if workDir is null (see the workDir option for details).
Declarations
    Type
    attribute set of (submodule)
    Default
    { }
    Example
    {
      runner1 = {
        enable = true;
        name = "runner1";
        tokenFile = "/secrets/token1";
        url = "https://github.com/owner/repo";
      };
      runner2 = {
        enable = true;
        name = "runner2";
        tokenFile = "/secrets/token2";
        url = "https://github.com/owner/repo";
      };
    }