summaryrefslogtreecommitdiff
path: root/hosts/cirrus/wireguard-server.nix
diff options
context:
space:
mode:
authorGrigory Shipunov2022-06-18 11:49:27 +0200
committerGrigory Shipunov2022-06-18 11:51:27 +0200
commit121e2f5004e109c5fc9530d136aae497061b8ef7 (patch)
tree6a7f9adba499e626431a402b8356a268b5d2c69b /hosts/cirrus/wireguard-server.nix
parent16da95bca0c6daecca412c7b883e4cf2aa6397ba (diff)
oxalab: init
Diffstat (limited to 'hosts/cirrus/wireguard-server.nix')
-rw-r--r--hosts/cirrus/wireguard-server.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/hosts/cirrus/wireguard-server.nix b/hosts/cirrus/wireguard-server.nix
new file mode 100644
index 0000000..742912e
--- /dev/null
+++ b/hosts/cirrus/wireguard-server.nix
@@ -0,0 +1,43 @@
+{ config, ... }:
+{
+ systemd.network = {
+ netdevs."oxalab" = {
+ netdevConfig = {
+ Kind = "wireguard";
+ Name = "oxalab";
+ Description = "oxa's enterprise network";
+ };
+ wireguardConfig = {
+ PrivateKeyFile = config.sops.secrets."wg/oxalab-seckey".path;
+ ListenPort = 51820;
+ # own pubkey: 5nCVC21BL+1r70OGwA4Q6Z/gcPLC3+ZF8sTurdn7N0E=
+ };
+ wireguardPeers = [
+ {
+ # microwave
+ wireguardPeerConfig = {
+ # nextcloud down, have to keep things in here: https://www.youtube.com/watch?v=1c6v7j1TUBI
+ PublicKey = "0zpfcNrmbsNwwbnDDX4SMl4BVTB0zuhGKixT9TJQoHc=";
+ AllowedIPs = [ "10.66.66.10/32" ];
+ PersistentKeepalive = 25;
+ };
+ }
+ {
+ # Dishwasher
+ wireguardPeerConfig = {
+ # nextcloud down, have to keep things in here: https://www.youtube.com/watch?v=1c6v7j1TUBI
+ PublicKey = "xrremJFIcxwR6snoTUK+mytjez60I91XE120OQGQ7gc=";
+ AllowedIPs = [ "10.66.66.100/32" ];
+ PersistentKeepalive = 25;
+ };
+ }
+ ];
+ };
+ networks."oxalab" = {
+ matchConfig.Name = "oxalab";
+ networkConfig = {
+ Address = "10.13.37.1";
+ };
+ };
+ };
+}