homelab/modules/gitea/thea/virtualisation.nix
shobu 65a47967da
All checks were successful
/ perform flake analysis (push) Successful in 32s
/ build hive configuration (push) Successful in 8m44s
add gitea jobs and runner configuration
build and deploy colmena hive using gitea actions
2025-11-12 12:25:22 +01:00

50 lines
1.2 KiB
Nix

{ nodes, pkgs, ... }:
{
systemd.sockets.podman.socketConfig.Symlinks = [
"/run/docker.sock"
];
virtualisation = {
containers = {
enable = true;
};
podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
defaultNetwork.settings.dns_enabled = true;
autoPrune.enable = true;
};
};
virtualisation.oci-containers.containers =
let
runner_config = pkgs.writeTextFile {
name = "config.yml";
text = ''
container:
network: "host"
'';
};
in
{
gitea-runner = {
image = "gitea/act_runner@sha256:8477d5b61b655caad4449888bae39f1f34bebd27db56cb15a62dccb3dcf3a944";
autoStart = true;
# capabilities = {
# NET_RAW = true;
# };
environment = {
GITEA_INSTANCE_URL = nodes.sin.config.services.gitea.settings.server.ROOT_URL;
GITEA_RUNNER_REGISTRATION_TOKEN = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW";
CONFIG_FILE = "/config.yml";
};
volumes = [
"/var/run/docker.sock:/var/run/docker.sock"
"${runner_config}:/config.yml:ro"
];
};
};
}