WIP exports: draft endpoints for services along with a 'firwewall' consumer

This commit is contained in:
Johannes Kirschbauer
2025-10-21 16:25:21 +02:00
parent 0d088cac7e
commit 63aceeeb4e
4 changed files with 79 additions and 0 deletions

View File

@@ -120,6 +120,30 @@ in
visible = false;
type = types.deferredModule;
default = {
options.endpoints = lib.mkOption {
type = types.attrsWith {
placeholder = "endpointName";
elemType = (
types.submodule {
options = {
port = lib.mkOption {
type = types.int;
description = "The port the service is running on";
};
protocol = lib.mkOption {
type = types.enum [
"tcp"
"udp"
];
default = "tcp";
description = "The protocol used to access the service";
};
};
}
);
};
default = { };
};
options.networking = lib.mkOption {
default = null;
type = lib.types.nullOr (