flake/modules/services/forgejo-ci.nix

31 lines
779 B
Nix
Raw Normal View History

2024-09-17 02:46:45 +02:00
{ config, pkgs, lib, inputs, cfg, ... }:
{
environment.systemPackages = with pkgs; [
docker
];
# Enable docker
virtualisation.docker = {
enable = true;
daemon.settings = {
fixed-cidr-v6 = "fd00::/80";
ipv6 = true;
};
};
2024-09-17 02:46:45 +02:00
opt.domain = lib.mkOption {type = lib.types.str;};
opt.instancename = lib.mkOption {type = lib.types.str;};
# Forgejo actions runner
services.gitea-actions-runner = {
2024-09-06 06:52:04 +02:00
package = config.pkgsInstances.unstable.forgejo-runner;
instances = {
2024-09-17 02:46:45 +02:00
"${cfg.instancename}" = {
enable = true;
2024-09-17 02:46:45 +02:00
url = "https://${cfg.domain}";
name = cfg.instancename;
2024-09-06 06:52:04 +02:00
tokenFile = config.sops.secrets."hosts/forgejo-ci/forgejo_ci_token".path;
labels = [];
};
};
};
2024-09-06 06:52:04 +02:00
}