Dns : Block some domains.

This commit is contained in:
Dmitry Voronin 2024-08-28 12:04:56 +03:00
parent 89ad7fd99e
commit e808b47dea
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -1,4 +1,4 @@
{ container, pkgs, lib, config, ... } @args: with lib; let { container, pkgs, lib, config, util, ... } @args: with lib; let
cfg = config.container.module.dns; cfg = config.container.module.dns;
in { in {
options = { options = {
@ -104,10 +104,17 @@ in {
}; };
}; };
customDNS = { customDNS = {
mapping = { mapping = let
block = "0.0.0.0";
in {
# All subdomains to current host. # All subdomains to current host.
# ${config.container.domain} = config.container.host; # ${config.container.domain} = config.container.host;
"voronind.com" = "10.0.0.1"; "voronind.com" = "10.0.0.1";
# Blocklist.
"gosuslugi.ru" = block;
"rutube.ru" = block;
"vk.com" = block;
}; };
}; };
port = cfg.port; port = cfg.port;