Wip Migrate podman

This commit is contained in:
soraefir
2026-05-06 01:05:32 +02:00
parent b2d040d414
commit fd7797c6e7
5 changed files with 65 additions and 20 deletions

View File

@@ -4,8 +4,7 @@ let
enabledConfigs = lib.filterAttrs (name: c: c.enable) cfg;
containerSetsList = lib.mapAttrsToList (name: containerCfg:
import (./defs + "/${name}.nix") {
inherit config pkgs lib ;
inherit (containerCfg) port special_param;
inherit config pkgs lib containerCfg;
}
) enabledConfigs;
mergedContainers = lib.attrsets.mergeAttrsList (lib.map(e: e.containers) containerSetsList);
@@ -16,5 +15,16 @@ in
backend = "podman";
containers = mergedContainers;
};
systemd.services.init-podman-network = {
description = "Create Podman network with subnet";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot";
script = ''
${pkgs.podman}/bin/podman network inspect podnet || \
${pkgs.podman}/bin/podman network create --subnet=10.88.0.0/16 podnet
'';
};
};
}