2024-04-21 18:13:48 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
inputs,
|
|
|
|
lib,
|
|
|
|
system,
|
|
|
|
...
|
|
|
|
}: let
|
2023-07-23 08:31:31 +01:00
|
|
|
unstable = inputs.nixpkgs-nixos-unstable;
|
2024-04-21 18:13:48 +01:00
|
|
|
package = unstable.legacyPackages."${system}".forgejo-runner;
|
2023-08-13 17:00:41 +01:00
|
|
|
in {
|
2024-04-21 18:13:48 +01:00
|
|
|
disabledModules = ["services/continuous-integration/gitea-actions-runner.nix"];
|
2024-03-16 15:53:48 +00:00
|
|
|
imports = [
|
|
|
|
"${unstable}/nixos/modules/services/continuous-integration/gitea-actions-runner.nix"
|
|
|
|
];
|
|
|
|
|
2023-06-01 22:10:18 +01:00
|
|
|
sops.secrets."gitea-runner-token" = {
|
|
|
|
sopsFile = ./gitea-runner-token.sops;
|
|
|
|
format = "binary";
|
|
|
|
};
|
2023-08-12 14:43:42 +01:00
|
|
|
virtualisation.docker = {
|
2023-06-01 22:10:18 +01:00
|
|
|
enable = true;
|
|
|
|
autoPrune.enable = true;
|
2024-04-27 10:21:40 +01:00
|
|
|
daemon.settings = {
|
|
|
|
fixed-cidr-v6 = "fd00::/80";
|
|
|
|
ipv6 = true;
|
|
|
|
};
|
2023-06-01 22:10:18 +01:00
|
|
|
};
|
2023-07-23 09:53:27 +01:00
|
|
|
|
2023-07-23 08:31:31 +01:00
|
|
|
services.gitea-actions-runner = {
|
|
|
|
inherit package;
|
2024-03-16 15:23:27 +00:00
|
|
|
instances.cupsnet-local = {
|
2023-07-23 08:31:31 +01:00
|
|
|
enable = true;
|
|
|
|
url = "https://git.cyplo.dev";
|
|
|
|
tokenFile = config.sops.secrets."gitea-runner-token".path;
|
2024-03-16 15:23:27 +00:00
|
|
|
name = "cupsnet local";
|
2024-04-21 18:13:48 +01:00
|
|
|
settings = {
|
2024-04-27 11:55:05 +01:00
|
|
|
runner.capacity = 1; #mem limit
|
2024-04-27 10:21:40 +01:00
|
|
|
container.network = "host";
|
|
|
|
cache = {
|
|
|
|
enabled = true;
|
|
|
|
port = 40135;
|
|
|
|
};
|
2024-04-21 18:13:48 +01:00
|
|
|
};
|
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"
|
2023-08-19 11:59:00 +01:00
|
|
|
"linux_amd64:host"
|
2023-07-23 08:31:31 +01:00
|
|
|
];
|
|
|
|
};
|
2023-06-01 22:10:18 +01:00
|
|
|
};
|
|
|
|
}
|