From 32c83bca9865d87d6ac3d425dc816c8a761c9740 Mon Sep 17 00:00:00 2001 From: soraefir Date: Fri, 1 May 2026 17:48:43 +0200 Subject: [PATCH] Fix cfg --- modules/shared/syscfg/default.nix | 34 +++++++++++++++---------------- systems/gateway/cfg.nix | 11 ++++++++++ 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/modules/shared/syscfg/default.nix b/modules/shared/syscfg/default.nix index efb4658..c81178b 100644 --- a/modules/shared/syscfg/default.nix +++ b/modules/shared/syscfg/default.nix @@ -53,24 +53,24 @@ let }; forward = { inInterface = mkOption { - type = types.str; - default = "ens3"; - description = "Incoming interface for forwarding"; + 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 ] ]; + }; }; - - 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 ] ]; - }; - } }; }; }; diff --git a/systems/gateway/cfg.nix b/systems/gateway/cfg.nix index cfaf888..029e880 100644 --- a/systems/gateway/cfg.nix +++ b/systems/gateway/cfg.nix @@ -25,6 +25,17 @@ server = { enable = true; peers = ["avalon" "asguard" "iriy" "valinor" ]; + forward = { + inInterface = "ens3"; + toAddr = "10.10.1.2"; + + ports = [ + [ 22 2222 ] # SSH + [ 80 80 ] # HTTP + [ 443 443 ] # HTTPS + [ 3979 3979 ] # OTTD + ]; + }; }; }; };