diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-03-31 14:42:04 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-03-31 14:42:04 -0500 |
| commit | 37f2947426d0dc0f56d6cebbef93ef64120800e4 (patch) | |
| tree | 719934f1422d6eae1b1e6ff11712be01a50dfedc /hosts/flex-wg-router/configuration.nix | |
| parent | d3fd65c0744822f999776f230ff574c78a4416c6 (diff) | |
| download | nixos-37f2947426d0dc0f56d6cebbef93ef64120800e4.tar.xz nixos-37f2947426d0dc0f56d6cebbef93ef64120800e4.zip | |
finish flex-wg-router config add wg0+wg1 interfaces
Diffstat (limited to 'hosts/flex-wg-router/configuration.nix')
| -rw-r--r-- | hosts/flex-wg-router/configuration.nix | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/hosts/flex-wg-router/configuration.nix b/hosts/flex-wg-router/configuration.nix index 5777626..18d9667 100644 --- a/hosts/flex-wg-router/configuration.nix +++ b/hosts/flex-wg-router/configuration.nix @@ -1,6 +1,8 @@ { config, lib, pkgs, ... }: let ipAddress = "10.1.1.1"; in { + imports = [ ./wg.nix ]; + # Setup bootloader boot._loader.enable = true; @@ -18,8 +20,8 @@ in { _interfaceLabels = { enable = true; interfaces = { - lan0 = "98:b7:85:22:9b:43"; # Internal - wan0 = "54:ee:75:8c:4b:2d"; # External + lan0 = "98:b7:85:22:9b:43"; # External + wan0 = "54:ee:75:8c:4b:2d"; # Internal }; }; # Set ip addresses @@ -37,27 +39,15 @@ in { address = "46.110.173.161"; interface = "wan0"; }; - nameservers = [ "127.0.0.1" ]; # Firewall rules firewall = { interfaces.wan0 = { - allowedTCPPorts = [ 22 ]; + allowedUDPPorts = [ 51820 ]; }; }; - #nat.forwardPorts = [ - # { - # sourcePort = 2222; - # proto = "tcp"; - # destination = "10.1.1.1:22"; - # } - # { - # sourcePort = 22; - # proto = "tcp"; - # destination = "10.1.1.1:22"; - # } - #]; }; + # Router config services._router = { dnsDhcpConfig = { localDomain = "wg-router.pls.lan"; |
