1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

fix: use separate config option to set port of DNSmasq

Older approach seems to not work on macOS 11 Big Sur for some reason.
This commit is contained in:
Łukasz Niemier 2021-01-28 13:59:11 +01:00
parent 8834df4317
commit bd75d14b0f
No known key found for this signature in database
GPG key ID: 15E70BE89F051D9B
2 changed files with 6 additions and 2 deletions

View file

@ -63,7 +63,10 @@ in
name = "resolver/${domain}"; name = "resolver/${domain}";
value = { value = {
enable = true; enable = true;
text = "nameserver ${cfg.bind}.${toString cfg.port}"; text = ''
port ${toString cfg.port}
nameserver ${cfg.bind}
'';
}; };
}) (builtins.attrNames cfg.addresses)); }) (builtins.attrNames cfg.addresses));
}; };

View file

@ -20,6 +20,7 @@ in
grep -F -- "--address=/localhost/127.0.0.1" ${config.out}/Library/LaunchDaemons/org.nixos.dnsmasq.plist grep -F -- "--address=/localhost/127.0.0.1" ${config.out}/Library/LaunchDaemons/org.nixos.dnsmasq.plist
echo >&2 "checking resolver config" echo >&2 "checking resolver config"
grep -F "nameserver 127.0.0.1.53" ${config.out}/etc/resolver/localhost grep -F "port 53" ${config.out}/etc/resolver/localhost
grep -F "nameserver 127.0.0.1" ${config.out}/etc/resolver/localhost
''; '';
} }