2023-07-23 08:31:31 +01:00
|
|
|
{ config, pkgs, inputs, lib, system, ... }:
|
|
|
|
let
|
|
|
|
unstable = inputs.nixpkgs-nixos-unstable;
|
|
|
|
package = unstable.legacyPackages."${system}".gitea-actions-runner;
|
|
|
|
in
|
|
|
|
{
|
2023-06-01 22:10:18 +01:00
|
|
|
sops.secrets."gitea-runner-token" = {
|
|
|
|
sopsFile = ./gitea-runner-token.sops;
|
|
|
|
format = "binary";
|
|
|
|
};
|
|
|
|
virtualisation.podman = {
|
|
|
|
enable = true;
|
|
|
|
autoPrune.enable = true;
|
2023-07-23 09:53:27 +01:00
|
|
|
defaultNetwork.settings = { dns_enabled = true; };
|
2023-06-01 22:10:18 +01:00
|
|
|
};
|
2023-07-23 09:53:27 +01:00
|
|
|
disabledModules = [ "services/continuous-integration/gitea-actions-runner.nix" ];
|
|
|
|
imports = [ "${unstable}/nixos/modules/services/continuous-integration/gitea-actions-runner.nix" ];
|
|
|
|
|
2023-07-23 08:31:31 +01:00
|
|
|
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";
|
2023-07-23 10:14:37 +01:00
|
|
|
hostPackages = with pkgs; [
|
|
|
|
bash
|
|
|
|
coreutils
|
|
|
|
curl
|
|
|
|
gawk
|
|
|
|
gitMinimal
|
|
|
|
gnused
|
|
|
|
nodejs
|
|
|
|
wget
|
|
|
|
sudo
|
2023-07-30 22:01:55 +01:00
|
|
|
nix
|
2023-07-23 10:14:37 +01:00
|
|
|
];
|
2023-07-23 08:31:31 +01:00
|
|
|
labels = [
|
2023-08-12 08:30:29 +01:00
|
|
|
"flakes-action:docker://git.cyplo.dev/cyplo/base-images/flakes-action:latest"
|
|
|
|
"ubuntu-kinetic:docker://ubuntu:kinetic"
|
2023-07-23 10:06:40 +01:00
|
|
|
"linux_amd64:host" # compat with github actions
|
2023-07-23 08:31:31 +01:00
|
|
|
];
|
|
|
|
};
|
2023-06-01 22:10:18 +01:00
|
|
|
};
|
|
|
|
}
|