diff options
| author | root@dishwasher | 2022-06-26 21:17:20 +0200 |
|---|---|---|
| committer | root@dishwasher | 2022-06-26 21:17:20 +0200 |
| commit | 35e93ce43b12e3be922e37b27f74d5d4b86929f4 (patch) | |
| tree | 14050d1e3f233c53f2ec2e46f9fde1d1a116d163 /microvms/nextcloud/oxaproxy.nix | |
| parent | 56ab27d66128ff3891708a5ddde4ecd2a5e3ded5 (diff) | |
nextcloud: init
Diffstat (limited to 'microvms/nextcloud/oxaproxy.nix')
| -rw-r--r-- | microvms/nextcloud/oxaproxy.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/microvms/nextcloud/oxaproxy.nix b/microvms/nextcloud/oxaproxy.nix new file mode 100644 index 0000000..42290ac --- /dev/null +++ b/microvms/nextcloud/oxaproxy.nix @@ -0,0 +1,58 @@ +{ config, ... }: { + networking.wireguard.enable = true; + networking.useNetworkd = true; + systemd.network = { + enable = true; + netdevs."10-oxaproxy" = { + netdevConfig = { + Kind = "wireguard"; + Name = "oxaproxy"; + Description = "oxa's enterprise reverse-proxy network"; + }; + wireguardConfig = { + PrivateKeyFile = config.sops.secrets."wg/oxaproxy-seckey".path; + #own pubkey: KCYoGx7TGei4X79EZo2NONCcmQjPzBUN1Ds6I9lQbz0= + }; + wireguardPeers = [ + { + # cirrus + wireguardPeerConfig = { + PublicKey = "0KMtL2fQOrrCH6c2a2l4FKiM73G86sUuyaNj4FarzVM="; + AllowedIPs = [ "10.34.45.0/24" ]; + Endpoint = [ "95.216.166.21:51821" ]; + PersistentKeepalive = 25; + }; + } + ]; + }; + networks."10-oxaproxy" = { + matchConfig.Name = "oxaproxy"; + networkConfig = { + Address = "10.34.45.100/24"; + }; + }; + + networks."111-host" = { + matchConfig.Name = "enp0s8"; + networkConfig = { + Address = "10.99.99.100/24"; + }; + routes = [ + { + routeConfig = { + Gateway="10.99.99.1"; + Destination="0.0.0.0/0"; + Metric=1024; + }; + } + { + routeConfig = { + Gateway="10.99.99.1"; + Destination="10.99.99.0/24"; + Metric=1024; + }; + } + ]; + }; + }; +} |
