1
1
Fork 0

networking: allow dnsmasq ports for networkmanager sharing

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2025-02-20 20:49:47 -06:00
parent 3434461b24
commit 42f491e386
Signed by: Myned
GPG key ID: C7224454F7881A34

View file

@ -9,6 +9,7 @@ in {
options.custom.settings.networking = {
enable = mkOption {default = false;};
dns = mkOption {default = config.custom.default;};
dnsmasq = mkOption {default = config.custom.full;};
firewall = mkOption {default = config.custom.default;};
ipv4 = mkOption {default = null;};
ipv6 = mkOption {default = null;};
@ -31,10 +32,14 @@ in {
# https://wiki.nixos.org/wiki/Networking
networking = {
hostName = config.custom.hostname;
firewall.enable = cfg.firewall;
useNetworkd = cfg.networkd;
wireless.iwd.enable = cfg.wifi;
firewall = mkIf cfg.firewall {
enable = true;
allowedUDPPorts = mkIf cfg.dnsmasq [53 67]; # dnsmasq
};
networkmanager = mkIf cfg.networkmanager {
enable = true;
wifi.backend = mkIf cfg.wifi "iwd";