downloads: improve lo setup
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Jake Hillion 2023-10-21 22:42:26 +01:00
parent d3dc82a150
commit 6e748ec05f

View File

@ -94,6 +94,8 @@ in
containers."downloads" = {
autoStart = true;
ephemeral = true;
additionalCapabilities = [ "CAP_NET_ADMIN" ];
extraFlags = [ "--network-namespace-path=/run/netns/downloads" ];
bindMounts = {
@ -123,10 +125,11 @@ in
systemd.services.setup-loopback = {
description = "Setup container loopback adapter.";
after = [ "network-pre.target" ];
before = [ "network.target" ];
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
script = with pkgs; "${iproute2}/bin/ip link set up lo";
};
networking.hosts = { "127.0.0.1" = builtins.map (x: "${x}.downloads.ts.hillion.co.uk") [ "prowlarr" "sonarr" "radarr" "deluge" ]; };