Commit 99350ae

HPCesia <me@hpcesia.com>
2026-02-04 17:20:38
feat: podman network
1 parent 3c66da6
Changed files (1)
modules
services
modules/services/podman.nix
@@ -1,10 +1,22 @@
 {
-  flake.modules.nixos."services/podman" = _: {
+  flake.modules.nixos."services/podman" = {config, ...}: {
     virtualisation.podman = {
       enable = true;
       dockerCompat = true;
       dockerSocket.enable = true;
       autoPrune.enable = true;
     };
+
+    # Enable container name DNS for all Podman networks.
+    networking.firewall.interfaces = let
+      matchAll =
+        if !config.networking.nftables.enable
+        then "podman+"
+        else "podman*";
+    in {
+      "${matchAll}".allowedUDPPorts = [53];
+    };
+
+    virtualisation.oci-containers.backend = "podman";
   };
 }