fix: network config for nix-darwin

This commit is contained in:
winston 2023-02-28 04:56:52 +01:00
parent b55abee6b2
commit 5dd062efce
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -5,7 +5,8 @@
}: let }: let
inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isLinux;
in { in {
services = { services =
{
dnsmasq = dnsmasq =
if isLinux if isLinux
then { then {
@ -30,8 +31,14 @@ in {
addresses."test" = "127.0.0.1"; addresses."test" = "127.0.0.1";
bind = "127.0.0.1"; bind = "127.0.0.1";
}; };
}
stubby = lib.mkIf isLinux { // (
if isLinux
then {
mullvad-vpn = {
enable = true;
};
stubby = {
enable = true; enable = true;
settings = { settings = {
resolution_type = "GETDNS_RESOLUTION_STUB"; resolution_type = "GETDNS_RESOLUTION_STUB";
@ -50,7 +57,7 @@ in {
]; ];
}; };
}; };
}
mullvad-vpn.enable = isLinux; else {}
}; );
} }