Fix wireguard

This commit is contained in:
mups 2024-08-27 22:16:28 +00:00
parent ea08e19912
commit 63331ab3f8
2 changed files with 18 additions and 18 deletions

View file

@ -32,6 +32,8 @@ in {
mods.server.media.enable = true;
mods.server.wireguard.enable = true;
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";

View file

@ -23,11 +23,10 @@
};
networking = lib.mkIf config.mods.wireguard.enable {
firewall = {
networking.firewall = lib.mkIf config.mods.wireguard.enable {
allowedUDPPorts = [ 51820 ]; # Clients and peers can use the same port, see listenport
};
wireguard.interfaces = {
networking.wireguard.interfaces = lib.mkIf config.mods.wireguard.enable {
wg0 = {
ips = [ "10.100.0.2/24" ];
listenPort = 51820;
@ -44,7 +43,6 @@
];
};
};
};
};
}