Skip to content

GitHub Runners

GitHub Actions self-hosted runners with access to the host's Nix Store for executing workflows on your own infrastructure.

View the synix NixOS module on Forgejo.

References

Setup

Generate a registration token for the runner and store it in sops:

github-runners:
    myrunner:
        token: abc123

Config

Minimal example registering a runner named myrunner for github.com/foo/bar:

{ config, inputs, ... }:

{
  imports = [ inputs.synix.nixosModules.github-runners ];

  services.github-runners.myrunner = {
    enable = true;
    user = "myrunner";
    group = "myrunner";
    url = "https://github.com/foo/bar";
    tokenFile = config.sops.secrets."github-runners/myrunner/token".path;
  };
}