bareksa: fix DNS resolution for bareksa.local domain when openvpn is connected

This commit is contained in:
Tigor Hutasuhut 2024-08-07 16:30:45 +07:00
parent 5e6617bf1b
commit a9373e58dd

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, pkgs, ... }:
{
networking.networkmanager.enable = true;
networking.extraHosts = ''
@ -16,4 +16,16 @@
allowedTCPPorts = cfg.allowedTCPPorts;
allowedUDPPorts = [ 53 ];
};
services.resolved = {
enable = true;
};
environment.etc."systemd/resolved.conf.d/10-bareksa.conf".source = (pkgs.formats.ini { }).generate "10-bareksa.conf" {
Resolve = {
# This dns server is only available when VPN is connected.
DNS = "192.168.3.215";
Domains = "~bareksa.local";
};
};
}