From 32267b084f19349a568ed36dccaf47169605d4da Mon Sep 17 00:00:00 2001 From: hexchen Date: Mon, 30 Nov 2020 18:28:54 +0000 Subject: [PATCH] nixda: add wireguard --- configuration/hosts/nixda/configuration.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configuration/hosts/nixda/configuration.nix b/configuration/hosts/nixda/configuration.nix index a1748df..61062a6 100644 --- a/configuration/hosts/nixda/configuration.nix +++ b/configuration/hosts/nixda/configuration.nix @@ -28,6 +28,19 @@ environment.systemPackages = with pkgs; [ blackmagicDesktopVideo makemkv ]; + networking.wg-quick.interfaces.cornbox = { + privateKeyFile = "/etc/wireguard/cornbox.key"; + address = [ "195.39.247.67/28" "2a0f:4ac0:1337::12/64" ]; + postUp = "ip link set dev cornbox mtu 1400"; + peers = [ + { + allowedIPs = [ "2a0f:4ac0:1337::/48" "195.39.247.64/27" ]; + publicKey = "8IWyiQL3wKP9CD/4UdS9b8mcbL67mkUyeSPORgEPvV0="; + endpoint = "cornbox.hetzner.chaoswit.ch:51821"; + } + ]; + }; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave