architect: Added architect.networks option attribute set

This commit is contained in:
Giulio De Pasquale 2023-05-12 12:32:29 +02:00
parent dc9dfd66ed
commit ce8efa3371

View File

@ -3,23 +3,60 @@
with lib; with lib;
{ {
options.architect.firewall = { options.architect = {
openTCP = mkOption { firewall = {
type = types.listOf types.int; openTCP = mkOption {
default = [ ]; type = types.listOf types.int;
default = [ ];
};
openUDP = mkOption {
type = types.listOf types.int;
default = [ ];
};
openTCPVPN = mkOption {
type = types.listOf types.int;
default = [ ];
};
openUDPVPN = mkOption {
type = types.listOf types.int;
default = [ ];
};
}; };
openUDP = mkOption {
type = types.listOf types.int; networks = mkOption {
default = [ ]; type = types.attrsOf (types.submodule {
}; options = {
openTCPVPN = mkOption { interface = mkOption {
type = types.listOf types.int; type = types.str;
default = [ ]; description = "The network interface name.";
}; };
openUDPVPN = mkOption {
type = types.listOf types.int; net = mkOption {
default = [ ]; type = types.str;
description = "The network address in CIDR format.";
};
devices = mkOption {
type = types.attrsOf (types.submodule {
options = {
address = mkOption {
type = types.str;
description = "The IP address of the device.";
};
hostname = mkOption {
type = types.str;
description = "The hostname of the device.";
};
};
});
default = { };
description = "An attribute set of devices with their configurations.";
};
};
});
default = { };
description = "An attribute set of networks with their configurations.";
}; };
}; };
} }