From 1f3682fe661acd98981b330908bf1263424489c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 23 Jul 2023 08:31:31 +0100 Subject: [PATCH] update actions runner --- nixos/boxes/bolty/gitea-runner.nix | 38 ++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/nixos/boxes/bolty/gitea-runner.nix b/nixos/boxes/bolty/gitea-runner.nix index 5c1e6e98..3ed90171 100644 --- a/nixos/boxes/bolty/gitea-runner.nix +++ b/nixos/boxes/bolty/gitea-runner.nix @@ -1,4 +1,9 @@ -{ config, pkgs, inputs, lib, ... }: { +{ config, pkgs, inputs, lib, system, ... }: +let + unstable = inputs.nixpkgs-nixos-unstable; + package = unstable.legacyPackages."${system}".gitea-actions-runner; +in +{ sops.secrets."gitea-runner-token" = { sopsFile = ./gitea-runner-token.sops; format = "binary"; @@ -7,17 +12,24 @@ enable = true; autoPrune.enable = true; }; - services.gitea-actions-runner.instances.bolty1 = { - enable = true; - url = "https://git.cyplo.dev"; - tokenFile = config.sops.secrets."gitea-runner-token".path; - name = "bolty1"; - labels = [ - "nixery-nix-node:docker://nixery.dev/shell/nix/git/nodejs:latest" - "nix-flakes:docker://nixpkgs/nix-flakes:latest" - "node16:docker://node:16-bullseye" # compat with github actions - "node-latest:docker://node:lts-bookworm" # compat with github actions - "ubuntu-kinetic:docker://ubuntu:kinetic" # compat with github actions - ]; + disabledModules = [ "services/continuous-integration/gitea-actions-runner.nix" ]; + imports = + [ "${unstable}/nixos/modules/services/continuous-integration/gitea-actions-runner.nix" ]; + + services.gitea-actions-runner = { + inherit package; + instances.bolty1 = { + enable = true; + url = "https://git.cyplo.dev"; + tokenFile = config.sops.secrets."gitea-runner-token".path; + name = "bolty1"; + labels = [ + "nixery-nix-node:docker://nixery.dev/shell/nix/git/nodejs:latest" + "nix-flakes:docker://nixpkgs/nix-flakes:latest" + "node16:docker://node:16-bullseye" # compat with github actions + "node-latest:docker://node:lts-bookworm" # compat with github actions + "ubuntu-kinetic:docker://ubuntu:kinetic" # compat with github actions + ]; + }; }; }