NixOS/system/services/stubby.nix

27 lines
576 B
Nix
Raw Normal View History

2024-06-14 19:42:14 +07:00
{ config, lib, pkgs, ... }:
let
cfg = config.profile.services.stubby;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
2024-06-14 20:03:30 +07:00
networking.resolvconf.useLocalResolver = true;
2024-06-14 19:42:14 +07:00
services.stubby = {
enable = true;
settings = pkgs.stubby.passthru.settingsExample // {
2024-06-14 20:03:30 +07:00
listen_addresses = [
"0.0.0.0@53"
"0::0"
];
2024-06-14 19:42:14 +07:00
upstream_recursive_servers = [
{
address_data = "1.1.1.1";
2024-06-14 20:03:30 +07:00
tls_port = 853;
2024-06-14 19:42:14 +07:00
tls_auth_name = "cloudflare-dns.com";
}
];
};
};
};
}