Fix container networking
This commit is contained in:
@ -18,6 +18,10 @@ with lib.my;
|
||||
allowedTCPPorts = [
|
||||
22 # SSH
|
||||
];
|
||||
interfaces."podman+" = {
|
||||
allowedUDPPorts = [ 53 ];
|
||||
allowedTCPPorts = [ 53 ];
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
@ -74,22 +78,9 @@ with lib.my;
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
systemd.services.podman-create-downloads-pod = {
|
||||
description = "Create a pod for download-related containers on this host";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "podman-qbittorrent.service" ];
|
||||
|
||||
path = [ pkgs.zfs ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = let
|
||||
podmanBin = "${pkgs.podman}/bin/podman";
|
||||
in ''
|
||||
${podmanBin} pod exists downloads-pod || ${podmanBin} pod create --name downloads-pod
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
extraPackages = [ pkgs.zfs ];
|
||||
};
|
||||
|
||||
@ -131,7 +122,6 @@ with lib.my;
|
||||
];
|
||||
extraOptions = [
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
"--pod=downloads-pod"
|
||||
];
|
||||
dependsOn = [ "jellyfin" ];
|
||||
};
|
||||
@ -149,7 +139,6 @@ with lib.my;
|
||||
];
|
||||
extraOptions = [
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
"--pod=downloads-pod"
|
||||
];
|
||||
};
|
||||
radarr = {
|
||||
@ -163,7 +152,6 @@ with lib.my;
|
||||
extraOptions = [
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
"--mount=type=bind,source=/mnt/library/movies,target=/movies"
|
||||
"--pod=downloads-pod"
|
||||
];
|
||||
dependsOn = [ "qbittorrent" ];
|
||||
};
|
||||
@ -178,7 +166,6 @@ with lib.my;
|
||||
extraOptions = [
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
"--mount=type=bind,source=/mnt/library/tv,target=/tv"
|
||||
"--pod=downloads-pod"
|
||||
];
|
||||
dependsOn = [ "qbittorrent" ];
|
||||
};
|
||||
|
Reference in New Issue
Block a user