mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Fix wireguard
This commit is contained in:
parent
ea08e19912
commit
63331ab3f8
2 changed files with 18 additions and 18 deletions
|
|
@ -32,6 +32,8 @@ in {
|
||||||
|
|
||||||
mods.server.media.enable = true;
|
mods.server.media.enable = true;
|
||||||
|
|
||||||
|
mods.server.wireguard.enable = true;
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
networking = lib.mkIf config.mods.wireguard.enable {
|
networking.firewall = lib.mkIf config.mods.wireguard.enable {
|
||||||
firewall = {
|
|
||||||
allowedUDPPorts = [ 51820 ]; # Clients and peers can use the same port, see listenport
|
allowedUDPPorts = [ 51820 ]; # Clients and peers can use the same port, see listenport
|
||||||
};
|
};
|
||||||
wireguard.interfaces = {
|
networking.wireguard.interfaces = lib.mkIf config.mods.wireguard.enable {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
ips = [ "10.100.0.2/24" ];
|
ips = [ "10.100.0.2/24" ];
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
|
|
@ -44,7 +43,6 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue