fix(network): split network config to avoid inf recursion
This commit is contained in:
parent
c95299669c
commit
78df3dc15b
2 changed files with 45 additions and 57 deletions
|
@ -2,14 +2,9 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||
in {
|
||||
services =
|
||||
{
|
||||
dnsmasq =
|
||||
if isLinux
|
||||
then {
|
||||
}: {
|
||||
services = {
|
||||
dnsmasq = {
|
||||
enable = true;
|
||||
servers = [
|
||||
"::1#53000"
|
||||
|
@ -24,17 +19,7 @@ in {
|
|||
# loopback for development
|
||||
address=/test/127.0.0.1
|
||||
'';
|
||||
}
|
||||
# nix-darwin config
|
||||
else {
|
||||
enable = true;
|
||||
addresses."test" = "127.0.0.1";
|
||||
bind = "127.0.0.1";
|
||||
};
|
||||
}
|
||||
// (
|
||||
if isLinux
|
||||
then {
|
||||
mullvad-vpn = {
|
||||
enable = true;
|
||||
};
|
||||
|
@ -57,7 +42,5 @@ in {
|
|||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
else {}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,5 +29,10 @@
|
|||
services = {
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
nix-daemon.enable = true;
|
||||
dnsmasq = {
|
||||
enable = true;
|
||||
addresses."test" = "127.0.0.1";
|
||||
bind = "127.0.0.1";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue