fix(mesh): refresh egress DNS with getent and route clients

This commit is contained in:
mikl 2026-08-03 08:55:11 +03:00
parent ab718ac336
commit 252d082c37
2 changed files with 7 additions and 1 deletions

View file

@ -20,6 +20,12 @@
networking.firewall.allowedUDPPorts = [ 51821 ];
# allowedIPsAsRoutes=false keeps peer declarations as crypto ACLs; install
# the client identity route explicitly, as in the backbone design.
networking.interfaces.wg-clients1.ipv4.routes = [
{ address = "10.0.1.10"; prefixLength = 32; }
];
systemd.tmpfiles.rules = [
"d /var/lib/wireguard 0700 root root -"
];

View file

@ -4,7 +4,7 @@
{ config, pkgs, ... }:
let
ip = "${pkgs.iproute2}/bin/ip";
getent = "${pkgs.glibc}/bin/getent";
getent = "${pkgs.getent}/bin/getent";
routeScript = pkgs.writeShellScript "mesh-egress-routes" ''
set -eu
${ip} link show wg-mesh >/dev/null