From 1b1d862f10183af1899b53c2f6c814674e5e326b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Wed, 26 Apr 2023 21:05:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B1=20move=20natting=20to=20wireguard?= =?UTF-8?q?=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/hydrogen/configuration.nix | 2 -- hosts/hydrogen/services/wireguard/default.nix | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hosts/hydrogen/configuration.nix b/hosts/hydrogen/configuration.nix index eae35bd..b884e8d 100644 --- a/hosts/hydrogen/configuration.nix +++ b/hosts/hydrogen/configuration.nix @@ -23,8 +23,6 @@ maxretry = 5; }; - networking.nat.enable = true; - users.mutableUsers = false; users.users.root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu" diff --git a/hosts/hydrogen/services/wireguard/default.nix b/hosts/hydrogen/services/wireguard/default.nix index 37d9bf9..90a68ea 100644 --- a/hosts/hydrogen/services/wireguard/default.nix +++ b/hosts/hydrogen/services/wireguard/default.nix @@ -6,7 +6,12 @@ ]; }; - nat.internalInterfaces = [ "wg0" ]; + nat = { + enable = true; + enableIPv6 = true; + externalInterface = "ens3"; + internalInterfaces = [ "wg0" ]; + }; wireguard.interfaces = { wg0 = {