From a184ad849f060dd24840ddc3d3dd61ade12d1980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 18 Jul 2024 09:01:49 +0200 Subject: nixos: update adm-omnia setup for deployment --- nixos/modules/router.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'nixos/modules/router.nix') diff --git a/nixos/modules/router.nix b/nixos/modules/router.nix index a658515..cd37d8b 100644 --- a/nixos/modules/router.nix +++ b/nixos/modules/router.nix @@ -44,6 +44,14 @@ in { ''; description = "Mapping of MAC address to IP address"; }; + guestStaticLeases = mkOption { + type = with types; attrsOf str; + default = {}; + example = '' + {"xx:xx:xx:xx:xx:xx" = "10.8.1.30";} + ''; + description = "Mapping of MAC address to IP address"; + }; }; }; @@ -148,6 +156,12 @@ in { EmitDNS = "yes"; DNS = "192.168.1.1"; }; + dhcpServerStaticLeases = + mapAttrsToList (n: v: { + MACAddress = n; + Address = v; + }) + cnf.guestStaticLeases; dhcpPrefixDelegationConfig = { UplinkInterface = cnf.wan; SubnetId = 2; -- cgit v1.2.3