From 9f9e9a319ec69c6c4fc808b4bb3445a7535ea719 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Thu, 5 Mar 2026 22:45:13 -0600 Subject: [PATCH] docker gitea runner --- modules/nix/gitea-actions-runners/docker.nix | 23 ++++++++++++++++++++ modules/servers/gitea.nix | 1 + 2 files changed, 24 insertions(+) create mode 100644 modules/nix/gitea-actions-runners/docker.nix diff --git a/modules/nix/gitea-actions-runners/docker.nix b/modules/nix/gitea-actions-runners/docker.nix new file mode 100644 index 0000000..3b035bc --- /dev/null +++ b/modules/nix/gitea-actions-runners/docker.nix @@ -0,0 +1,23 @@ +{ + lib, + config, + ... +}: +let + cfg = config.my.servers.gitea; +in +{ + config = lib.mkIf (cfg.enable && config.my.secureHost) { + services.gitea-actions-runner.instances.docker = { + inherit (cfg) url enable; + name = "${config.networking.hostName}-docker"; + tokenFile = config.sops.secrets.gitea.path; + labels = [ + "ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:full-latest" + "ubuntu-24.04:docker://ghcr.io/catthehacker/ubuntu:full-24.04" + "ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:full-22.04" + "ubuntu-20.04:docker://ghcr.io/catthehacker/ubuntu:full-20.04" + ]; + }; + }; +} diff --git a/modules/servers/gitea.nix b/modules/servers/gitea.nix index 6650c09..244601f 100644 --- a/modules/servers/gitea.nix +++ b/modules/servers/gitea.nix @@ -11,6 +11,7 @@ in { imports = [ ../nix/gitea-actions-runners/nixos.nix + ../nix/gitea-actions-runners/docker.nix ]; options.my.servers.gitea = setup.mkOptions "gitea" "git" 9083; config = lib.mkIf (cfg.enable && config.my.secureHost) {