Wip Migrate podman
This commit is contained in:
@@ -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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user