Commit e629fc855aaf

Vincent Demeester <vincent@sbr.pm>
2023-11-24 12:19:38
containers: add subnet pools configuration.
It helps making kind+podman run correctly rootless. systemd-run --user --scope --property=Delegate=yes kind Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 15a404e
Changed files (1)
systems
modules
systems/modules/dev/containers.nix
@@ -39,7 +39,23 @@ in
   };
   config = mkIf cfg.enable (mkMerge [
     {
-      virtualisation.containers.enable = true;
+      virtualisation.containers = {
+        enable = true;
+        containersConf.settings = {
+          network = {
+            default_subnet_pools = [
+              { "base" = "11.0.0.0/24"; "size" = 24; }
+              {
+                "base" = "192.168.129.0/24";
+                "size" = 24;
+              }
+              { "base" = "192.168.130.0/24"; "size" = 24; }
+              { "base" = "192.168.131.0/24"; "size" = 24; }
+              { "base" = "192.168.132.0/24"; "size" = 24; }
+            ];
+          };
+        };
+      };
     }
     (mkIf cfg.docker.enable {
       virtualisation = {