Migrate gateway

This commit is contained in:
soraefir
2026-05-01 17:31:09 +02:00
parent 60bf451310
commit a7ce1dc7ea
12 changed files with 168 additions and 78 deletions

View File

@@ -42,6 +42,36 @@ let
type = types.str;
default = "";
};
server = {
enable = mkOption {
type = types.bool;
default = false;
};
peers = mkOption {
type = types.listOf types.str;
default = [];
};
forward = {
inInterface = mkOption {
type = types.str;
default = "ens3";
description = "Incoming interface for forwarding";
};
toAddr = mkOption {
type = types.str;
description = "Destination address (IPv4 or IPv6)";
example = "10.10.1.2";
};
ports = mkOption {
type = types.listOf (types.listOf types.port);
default = [];
description = "Port mappings: [ [srcPort dstPort] ... ]";
example = [ [ 22 22 ] [ 80 80 ] [ 443 443 ] ];
};
}
};
};
};
makeOpt = with lib; {
@@ -55,7 +85,7 @@ let
};
virt = mkOption {
type = types.bool;
default = true;
default = false;
};
power = mkOption {
type = types.bool;