nixos-server-conf/runner_system.nix
2025-07-07 10:01:55 +02:00

66 lines
1.7 KiB
Nix

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in
{
imports = [
./shared/system.nix
./shared/dev_user.nix
./shared/docker.nix
./shared/ssh.nix
];
services = {
gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances.default = {
enable = true;
name = "linux-runner";
url = "https://pts-paper.de";
token = "B3XA4FbbN17S2Z94nTLMmJsZNU63sN45oXR2Bna9";
labels = [
"ubuntu-latest:docker://node:16-bullseye"
"ubuntu-24.04:docker://node:16-bullseye"
"ubuntu-22.04:docker://node:16-bullseye"
"ubuntu-20.04:docker://node:16-bullseye"
];
settings = {
runner = {
capacity = 4;
};
};
};
};
};
virtualisation = {
oci-containers = {
containers = {
forgejo_runner = {
image = "vegardit/gitea-act-runner:dind-latest";
autoStart = true;
privileged = true;
environment = {
GITEA_RUNNER_NAME = "DinD-Runner";
GITEA_INSTANCE_URL = "https://pts-paper.de";
GITEA_RUNNER_REGISTRATION_TOKEN = "1UgO1aveXBEvNnG5Ydc9GendNtTyZ9Bf0hrQU5gT";
GITEA_RUNNER_LABELS = "ubuntu-24.04-dind:docker://ghcr.io/catthehacker/ubuntu:act-24.04";
};
};
};
};
};
}