diff --git a/configuration.nix b/configuration.nix index eadb95b..488f2a4 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,6 +2,7 @@ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ./forgejo.nix + ./runner.nix ./web.nix ]; diff --git a/runner.nix b/runner.nix new file mode 100644 index 0000000..61846d8 --- /dev/null +++ b/runner.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: { + services.forgejo.settings.actions.ENABLED = true; + + virtualisation.docker = { + enable = true; + package = pkgs.docker_29; + autoPrune.enable = true; # removes unused images and containers weekly + }; + + services.gitea-actions-runner = { + package = pkgs.forgejo-runner; + instances.main = { + enable = true; + name = "web-runner"; + url = "https://forgejo.cordevelop.com"; + tokenFile = "/var/lib/forgejo-runner-token"; + labels = [ + "ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest" + "docker:docker://ghcr.io/catthehacker/ubuntu:act-latest" + ]; + }; + }; +}