diff options
| author | Grigory Shipunov | 2022-06-19 22:09:13 +0200 |
|---|---|---|
| committer | Grigory Shipunov | 2022-06-19 22:09:13 +0200 |
| commit | 1733cf5b1f630aafa127771a2c657f1e106e0d80 (patch) | |
| tree | 1a4b8e7584834e4f11a2e3b551617a544529212c /hosts/cirrus/wireguard-server.nix | |
| parent | b84bd0c69f91ef240117039b9cee69c9e566608a (diff) | |
oxaproxy: init
Diffstat (limited to 'hosts/cirrus/wireguard-server.nix')
| -rw-r--r-- | hosts/cirrus/wireguard-server.nix | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/hosts/cirrus/wireguard-server.nix b/hosts/cirrus/wireguard-server.nix index 2d939c0..0f28114 100644 --- a/hosts/cirrus/wireguard-server.nix +++ b/hosts/cirrus/wireguard-server.nix @@ -1,8 +1,9 @@ { config, ... }: { - networking.firewall.allowedUDPPorts = [ 51820 ]; + networking.firewall.allowedUDPPorts = [ 51820 51821 ]; networking.wireguard.enable = true; systemd.network = { + # oxalab netdevs."oxalab" = { netdevConfig = { Kind = "wireguard"; @@ -42,5 +43,27 @@ IPForward = "ipv4"; }; }; + + + # oxaproxy + netdevs."oxaproxy" = { + netdevConfig = { + Kind = "wireguard"; + Name = "oxaproxy"; + Description = "oxa's enterprise reverse-proxy network"; + }; + wireguardConfig = { + PrivateKeyFile = config.sops.secrets."wg/oxaproxy-seckey".path; + #own pubkey 0KMtL2fQOrrCH6c2a2l4FKiM73G86sUuyaNj4FarzVM= + ListenPort = 51821; + }; + wireguardPeers = [ ]; + }; + networks."oxaproxy" = { + matchConfig.Name = "oxaproxy"; + networkConfig = { + Address = "10.34.45.1/24"; + }; + }; }; } |
