From a4ab740d07706d86503b84d36addcbbbf7a4944b Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 1 May 2026 18:40:37 +0200 Subject: Re-add simple VPN and simplify module with shared users with tunnel Signed-off-by: Mel --- assets/vpn.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 assets/vpn.nix (limited to 'assets') diff --git a/assets/vpn.nix b/assets/vpn.nix new file mode 100644 index 0000000..e30438b --- /dev/null +++ b/assets/vpn.nix @@ -0,0 +1,33 @@ +# shared vpn definitions for wireguard, used by both the tunnel +# and the plain vpn module. + +{ + # the public key of the shared wireguard key used by all vpn hosts. + # the matching private key is the secret `wg-private-key`. + public = "s5yyPCJiN0uqW0jzKIbYCF7I9TthymiRzpNt466XeWk="; + + # users allowed to connect to any wireguard-based service. + # their ip is always a template, with 'X' representing the + # network subnet they are connecting to. + users = { + mel = { + key = "vnZoHXapCLLUhZ8A8R5W0iJ8LpWVLve29z41kkoT0BU="; + ip = "10.123.X.101"; + }; + + andrei = { + key = "qqU4uYImLfUohIwl4KBshPtTINFcs0JVALjbmwpfxRg="; + ip = "10.123.X.102"; + }; + + sergo = { + key = "qbZGMNIDZFCJC6SHtlyNIlIdGWHELceXClJCcagrj2Y="; + ip = "10.123.X.103"; + }; + + fedor = { + key = "tEO9r8+jTpu8TBRmZ+/v087IgD/QfmofLUKs249i/F0="; + ip = "10.123.X.104"; + }; + }; +} -- cgit 1.4.1