refactor: make wireguard optional

This commit is contained in:
DACHXY 2024-12-31 14:32:26 +08:00
parent 3970c22f05
commit 7a3b5e86d1
5 changed files with 9 additions and 8 deletions

View file

@ -1,7 +1,8 @@
{ config, pkgs, ... }:
let
configPath = "/etc/wireguard/wg0.conf";
in
{
networking.firewall = { allowedUDPPorts = [ 51820 ]; };
networking.wg-quick.interfaces.wg0.configFile = "/etc/wireguard/wg0.conf";
networking.wg-quick.interfaces.wg0.configFile = configPath;
}