From 9546c19d9b0a7964a7909e95477c1bcc8ec26c68 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Tue, 2 Jan 2024 22:44:04 +0100 Subject: [PATCH] docker: Make interface name dependent on whether nftables is used --- modules/docker/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/docker/default.nix b/modules/docker/default.nix index cc7db6e..47d1024 100644 --- a/modules/docker/default.nix +++ b/modules/docker/default.nix @@ -5,6 +5,8 @@ }: with lib; let cfg = config.eboskma.podman; + + podmanInterfaces = if config.networking.nftables.enable then "podman*" else "podman+"; in { options.eboskma.podman = { @@ -55,7 +57,7 @@ in users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "podman" ]; # Make DNS work in containers - networking.firewall.interfaces."podman*" = { + networking.firewall.interfaces.${podmanInterfaces} = { allowedUDPPorts = [ 53 ]; allowedTCPPorts = [ 53 ]; };