mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 19:15:37 +00:00
setup bind
This commit is contained in:
parent
b07a8f5e20
commit
9e8bac6834
@ -126,6 +126,7 @@
|
||||
mail.smtpHost = "smtp.purelymail.com";
|
||||
dotfilesRepo = "git@github.com:nmasur/dotfiles";
|
||||
hostnames = {
|
||||
zone = baseName;
|
||||
git = "git.${baseName}";
|
||||
metrics = "metrics.${baseName}";
|
||||
prometheus = "prom.${baseName}";
|
||||
|
37
modules/nixos/services/bind.nix
Normal file
37
modules/nixos/services/bind.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
services.bind = {
|
||||
|
||||
cacheNetworks = [ "192.168.0.0/16" ];
|
||||
|
||||
forwarders = [ "1.1.1.1" "1.0.0.1" ];
|
||||
|
||||
# Use rpz zone as an override
|
||||
extraOptions = ''response-policy { zone "rpz"; };'';
|
||||
|
||||
zones = {
|
||||
rpz = {
|
||||
master = true;
|
||||
file = pkgs.writeText "db.rpz" ''
|
||||
$TTL 60 ; 1 minute
|
||||
@ IN SOA localhost. root.localhost. (
|
||||
2023071800 ; serial
|
||||
1h ; refresh
|
||||
30m ; retry
|
||||
1w ; expire
|
||||
30m ; minimum ttl
|
||||
)
|
||||
IN NS localhost.
|
||||
localhost A 127.0.0.1
|
||||
stream A 192.168.0.218
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user