dotfiles/nixos/boxes/cupsnet/gitea-runner.nix

64 lines
1.4 KiB
Nix
Raw Normal View History

{
config,
pkgs,
inputs,
lib,
system,
...
}: let
2023-07-23 08:31:31 +01:00
unstable = inputs.nixpkgs-nixos-unstable;
package = unstable.legacyPackages."${system}".forgejo-runner;
2023-08-13 17:00:41 +01:00
in {
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";
settings = {
runner.capacity = 1; #mem limit
2024-04-27 10:21:40 +01:00
container.network = "host";
cache = {
enabled = true;
port = 40135;
};
};
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 = [
"flakes-action:docker://git.cyplo.dev/cyplo/base-images/flakes-action:latest"
"linux_amd64:host"
2023-07-23 08:31:31 +01:00
];
};
2023-06-01 22:10:18 +01:00
};
}