{ config, lib, pkgs, ... }: { systemd.network = { enable = true; networks = { "50-wg0" = { name = "wg0"; address = [ "10.10.10.1/24" ]; routes = [{ routeConfig = { Destination = "10.10.10.0/24"; Scope = "link"; }; }]; }; }; netdevs = { "50-wg0" = { netdevConfig = { Name = "wg0"; Kind = "wireguard"; }; wireguardConfig = { ListenPort = 1194; PrivateKeyFile = config.age.secrets."wg-key".path; }; wireguardPeers = [ ]; }; }; }; networking.firewall.allowedUDPPorts = [ 1194 ]; }