Modules/Docker: Add networks option
This commit is contained in:
@ -7,4 +7,48 @@
|
||||
|
||||
podman = lib.mkEnableOption "Use podman instead of docker";
|
||||
docker.rootless = lib.mkEnableOption "Use rootless docker (no effect if podman is used)";
|
||||
|
||||
networks = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule ({
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
disable_masquerade = lib.mkEnableOption "Disable IP masquerading for this network";
|
||||
|
||||
ipv6 = {
|
||||
enable = lib.mkEnableOption "Enable IPv6 for this network";
|
||||
|
||||
gateway = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "The IPv6 gateway for this network";
|
||||
example = "2000::1";
|
||||
default = null;
|
||||
};
|
||||
|
||||
subnet = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "The IVv6 subnet mask for this network";
|
||||
example = "2000::/80";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}));
|
||||
description = "Docker/Podman networks to create";
|
||||
example = ''
|
||||
{
|
||||
behind-nginx = {
|
||||
disable_masquerade = false;
|
||||
ipv6 = {
|
||||
enable = true;
|
||||
gateway = "2000::1";
|
||||
subnet = "2000::/80";
|
||||
};
|
||||
}
|
||||
}
|
||||
'';
|
||||
default = {};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user