nix-infra/config/hosts/forgejo-actions-runner/networking.nix
June e0b593289d
forgejo-actions-runner(host): enable IPv6 support in Docker
Enable the relevant config option and move to new network with an
explicit IPv6, because otherwise there's no default v6 route and v6 in
the Docker containers doesn't work.
2026-04-29 03:08:20 +02:00

27 lines
767 B
Nix

{ lib, config, ... }:
let
runnerInstances = lib.attrValues config.services.gitea-actions-runner.instances;
runnerCachePorts = lib.map (i: i.settings.cache.proxy_port) runnerInstances;
in {
networking = {
interfaces.net0 = {
ipv6.addresses = [
{
address = "2a00:14b0:42:102::18";
prefixLength = 64;
}
];
};
defaultGateway6 = "2a00:14b0:42:102::1";
nameservers = [ "212.12.50.158" "192.76.134.90" ];
search = [ "hamburg.ccc.de" ];
};
systemd.network.links."10-net0" = {
matchConfig.MACAddress = "1E:E0:4E:D0:DA:BE";
linkConfig.Name = "net0";
};
# open ports for runner cache proxy so that we can use the cache action
networking.firewall.allowedTCPPorts = runnerCachePorts;
}