From 5828af9fc19e18dc85e49fcc1a251a7eb25d909c Mon Sep 17 00:00:00 2001 From: Max Audron Date: Fri, 11 Aug 2023 16:51:35 +0200 Subject: init --- modules/wireguard/roaming.nix | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 modules/wireguard/roaming.nix (limited to 'modules/wireguard/roaming.nix') diff --git a/modules/wireguard/roaming.nix b/modules/wireguard/roaming.nix new file mode 100644 index 0000000..a89ce5d --- /dev/null +++ b/modules/wireguard/roaming.nix @@ -0,0 +1,64 @@ +{ config, pkgs, lib, ... }: + +{ + config = lib.mkIf config.wireguard.enable { + networking.wireguard.interfaces.wg0.peers = lib.mkIf config.wireguard.roaming [ + { # audron computer + publicKey = "okZQ5cMSu4+M3IKp1yIBuknmAKEzJLKe8tpVeY46phU="; + allowedIPs = [ + "10.10.0.10/32" + "2a0f:9400:8020:beef::10/128" + "fd15:3d8c:d429:beef::10/128" + ]; + } + { # audron homeassistant + publicKey = "afIZuhegBlyTmmzjikqtJ6lqYF2clfxtE4ZzQ9oijCg="; + allowedIPs = [ + "10.10.0.14/32" + "2a0f:9400:8020:beef::14/128" + "fd15:3d8c:d429:beef::14/128" + ]; + } + { # audron phone + publicKey = "LDzzGWlBmy9FQ/+bNAaLM2TmS8OR291uVTntwmb/gmM="; + allowedIPs = [ + "10.10.0.15/32" + "2a0f:9400:8020:beef::15/128" + "fd15:3d8c:d429:beef::15/128" + ]; + } + { # d3fus computer + publicKey = "CoMGgzL31yb0ozA17OuF0IDpkV2dnJ7j74itaQb0k1U="; + allowedIPs = [ + "10.10.0.20/32" + "2a0f:9400:8020:beef::20/128" + "fd15:3d8c:d429:beef::20/128" + ]; + } + { # d3fus streamer + publicKey = "byHXbaIVKARj3RBqyRuEUAsU5qeh/bmp/OLn6Y9qJV8="; + allowedIPs = [ + "10.10.0.21/32" + "2a0f:9400:8020:beef::21/128" + "fd15:3d8c:d429:beef::21/128" + ]; + } + { # d3fus phone + publicKey = "OEi+MTdy8oMWhkyC5NKHl6ztk92o4gYkgCTt5EMN5i4="; + allowedIPs = [ + "10.10.0.22/32" + "2a0f:9400:8020:beef::22/128" + "fd15:3d8c:d429:beef::22/128" + ]; + } + { # d3fus mac + publicKey = "dWWragU6AwsJeX6EhtybtT1VmjPdaSDKqmU/yxZQuxo="; + allowedIPs = [ + "10.10.0.23/32" + "2a0f:9400:8020:beef::23/128" + "fd15:3d8c:d429:beef::23/128" + ]; + } + ]; + }; +} -- cgit v1.2.3