docs: add README.md

This commit is contained in:
dachxy 2025-01-03 13:59:16 +08:00
parent fe1d9adfa8
commit 1c2b263904
19 changed files with 241 additions and 73 deletions

View file

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