stubby: added config

This commit is contained in:
Tigor Hutasuhut 2024-06-14 19:42:14 +07:00
parent bbcbc73ee2
commit 0a5557c191
4 changed files with 23 additions and 0 deletions

View file

@ -12,5 +12,6 @@ in
nextcloud.enable = mkEnableOption "nextcloud"; nextcloud.enable = mkEnableOption "nextcloud";
syncthing.enable = mkEnableOption "syncthing"; syncthing.enable = mkEnableOption "syncthing";
openvpn.enable = mkEnableOption "openvpn"; openvpn.enable = mkEnableOption "openvpn";
stubby.enable = mkEnableOption "stubby";
}; };
} }

View file

@ -35,6 +35,7 @@
nextcloud.enable = true; nextcloud.enable = true;
syncthing.enable = true; syncthing.enable = true;
openvpn.enable = true; openvpn.enable = true;
stubby.enable = true;
}; };
}; };
} }

View file

@ -9,5 +9,6 @@
./syncthing.nix ./syncthing.nix
./kavita.nix ./kavita.nix
./openvpn.nix ./openvpn.nix
./stubby.nix
]; ];
} }

View file

@ -0,0 +1,20 @@
{ config, lib, pkgs, ... }:
let
cfg = config.profile.services.stubby;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
services.stubby = {
enable = true;
settings = pkgs.stubby.passthru.settingsExample // {
upstream_recursive_servers = [
{
address_data = "1.1.1.1";
tls_auth_name = "cloudflare-dns.com";
}
];
};
};
};
}