aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/router.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2024-07-18 09:01:49 +0200
committerKarel Kočí <cynerd@email.cz>2024-07-18 09:01:49 +0200
commita184ad849f060dd24840ddc3d3dd61ade12d1980 (patch)
tree661d3ad8933fcdf186aeb293fe529379fd0472b5 /nixos/modules/router.nix
parent632f8c5cc19be6d7ccd975f825d534627d0cbeff (diff)
downloadnixos-personal-a184ad849f060dd24840ddc3d3dd61ade12d1980.tar.gz
nixos-personal-a184ad849f060dd24840ddc3d3dd61ade12d1980.tar.bz2
nixos-personal-a184ad849f060dd24840ddc3d3dd61ade12d1980.zip
nixos: update adm-omnia setup for deployment
Diffstat (limited to 'nixos/modules/router.nix')
-rw-r--r--nixos/modules/router.nix14
1 files changed, 14 insertions, 0 deletions
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;