diff options
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/hosts.nix | 1 | ||||
-rw-r--r-- | nixos/modules/router.nix | 14 | ||||
-rw-r--r-- | nixos/modules/wifi-spt.nix | 8 |
3 files changed, 19 insertions, 4 deletions
diff --git a/nixos/modules/hosts.nix b/nixos/modules/hosts.nix index e7ad76b..f53fd8c 100644 --- a/nixos/modules/hosts.nix +++ b/nixos/modules/hosts.nix @@ -64,6 +64,7 @@ in { "ridcully" = "10.8.3.60"; "3dprint" = "10.8.3.80"; "mpd" = "10.8.3.51"; + "printer" = "192.168.0.20"; # Portable "albert" = "10.8.3.61"; "binky" = "10.8.3.63"; 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; diff --git a/nixos/modules/wifi-spt.nix b/nixos/modules/wifi-spt.nix index a74440d..d013473 100644 --- a/nixos/modules/wifi-spt.nix +++ b/nixos/modules/wifi-spt.nix @@ -140,8 +140,8 @@ in { networkConfig.Bridge = "brlan"; bridgeVLANs = [ { - EgressUntagged = 2; - PVID = 2; + EgressUntagged = 2; + PVID = 2; } ]; }; @@ -165,8 +165,8 @@ in { networkConfig.Bridge = "brlan"; bridgeVLANs = [ { - EgressUntagged = 2; - PVID = 2; + EgressUntagged = 2; + PVID = 2; } ]; }; |