fix: wireguard config file permission issue

This commit is contained in:
DACHXY 2025-01-03 14:33:27 +08:00
parent 1c2b263904
commit 945f767d08
6 changed files with 33 additions and 24 deletions

View file

@ -3,16 +3,13 @@
system,
inputs,
nix-version,
git-config,
username,
...
}:
let
cursor-size = "24";
username = "danny";
git-config = {
username = "DACHXY";
email = "danny10132024@gmail.com";
};
in
{
imports = [

View file

@ -3,16 +3,13 @@
inputs,
system,
nix-version,
git-config,
username,
...
}:
let
cursor-size = "32";
username = "danny";
git-config = {
username = "DACHXY";
email = "danny10132024@gmail.com";
};
in
{
imports = [

View file

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