1

Modules/Docker: Add networks option

This commit is contained in:
2025-07-10 00:40:13 +02:00
parent bcbcec1e21
commit f0a18f452d
2 changed files with 115 additions and 0 deletions

View File

@ -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 = {};
};
}