diff --git a/common/wireguard-peers.nix b/common/wireguard-peers.nix new file mode 100644 index 0000000..caef9ac --- /dev/null +++ b/common/wireguard-peers.nix @@ -0,0 +1,38 @@ +[ + { # Sulu + publicKey = "j6YVekgGS4nhL5zUiOTeK2BVQkYGlTQaiUpwcqQyfRk="; + allowedIPs = [ + "10.100.0.3/32" + ]; + } + { # Worf + publicKey = "kW8SyzCh2tw8GzZV6bPn+IQVNUoUhseNfEm3rHnR1So="; + allowedIPs = [ + "10.100.0.4/32" + ]; + } + { # Phone + publicKey = "axFXtcTYtW6m1FT9Czn9DRvG+b05D7j+0yRMjn/FJEk="; + allowedIPs = [ + "10.100.0.5/32" + ]; + } + { # Riker + publicKey = "r715vpgH1H0zvN+Z5wcNKcOo5e6UM3fBfh9BZwTBjmA="; + allowedIPs = [ + "10.100.0.6/32" + ]; + } + { # fa-t14-2025 + publicKey = "UPpUVWQqOKT65MFym1sFDTstNmuynDYE4LOOtbWqEng="; + allowedIPs = [ + "10.100.0.7/32" + ]; + } + { # Turtle + publicKey = "mDzAtRPv+O5TDHa9DGodF/KKuFXRBYwSqfPyeWfdfRI="; + allowedIPs = [ + "10.100.0.8/32" + ]; + } +] diff --git a/hosts/burnham/services/wireguard.nix b/hosts/burnham/services/wireguard.nix index 1376501..ef75a2d 100644 --- a/hosts/burnham/services/wireguard.nix +++ b/hosts/burnham/services/wireguard.nix @@ -32,37 +32,7 @@ in { ]; endpoint = "site3.feal.no:51902"; } - { # Worf - publicKey = "kW8SyzCh2tw8GzZV6bPn+IQVNUoUhseNfEm3rHnR1So="; - allowedIPs = [ - "10.100.0.4/32" - ]; - } - { # Phone - publicKey = "axFXtcTYtW6m1FT9Czn9DRvG+b05D7j+0yRMjn/FJEk="; - allowedIPs = [ - "10.100.0.5/32" - ]; - } - { # Riker - publicKey = "r715vpgH1H0zvN+Z5wcNKcOo5e6UM3fBfh9BZwTBjmA="; - allowedIPs = [ - "10.100.0.6/32" - ]; - } - { # Work-laptop - publicKey = "px4YstB16lFjgdLQkH55wz8gQRupX/LTxg8dNFijDTA="; - allowedIPs = [ - "10.100.0.7/32" - ]; - } - { # Turtle - publicKey = "mDzAtRPv+O5TDHa9DGodF/KKuFXRBYwSqfPyeWfdfRI="; - allowedIPs = [ - "10.100.0.8/32" - ]; - } - ]; + ] ++ (import ../../../common/wireguard-peers.nix); }; }; } diff --git a/hosts/defiant/services/wireguard.nix b/hosts/defiant/services/wireguard.nix index f8ca45c..77bfb11 100644 --- a/hosts/defiant/services/wireguard.nix +++ b/hosts/defiant/services/wireguard.nix @@ -32,43 +32,7 @@ in { ]; endpoint = "site2.feal.no:51902"; } - { # Sulu - publicKey = "j6YVekgGS4nhL5zUiOTeK2BVQkYGlTQaiUpwcqQyfRk="; - allowedIPs = [ - "10.100.0.3/32" - ]; - } - { # Worf - publicKey = "kW8SyzCh2tw8GzZV6bPn+IQVNUoUhseNfEm3rHnR1So="; - allowedIPs = [ - "10.100.0.4/32" - ]; - } - { # Phone - publicKey = "axFXtcTYtW6m1FT9Czn9DRvG+b05D7j+0yRMjn/FJEk="; - allowedIPs = [ - "10.100.0.5/32" - ]; - } - { # Riker - publicKey = "r715vpgH1H0zvN+Z5wcNKcOo5e6UM3fBfh9BZwTBjmA="; - allowedIPs = [ - "10.100.0.6/32" - ]; - } - { # Work-laptop - publicKey = "px4YstB16lFjgdLQkH55wz8gQRupX/LTxg8dNFijDTA="; - allowedIPs = [ - "10.100.0.7/32" - ]; - } - { # Turtle - publicKey = "mDzAtRPv+O5TDHa9DGodF/KKuFXRBYwSqfPyeWfdfRI="; - allowedIPs = [ - "10.100.0.8/32" - ]; - } - ]; + ] ++ (import ../../../common/wireguard-peers.nix); }; }; }