The blocking step is now working, if I start blocky manually.
The next problem is that , getting configuration.nix to generate the correct yaml config file.
The problem is generating the inline code, under the slack group.
blocking:
blackLists:
ads:
- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
adult:
- https://blocklistproject.github.io/Lists/porn.txt
slack:
- |
www.youtube.com
www.facebook.com
The entry in my configuration.nix look like this.
networking.nameservers = [ "127.0.0.1" ];
services.blocky = {
enable = true;
# enable = false;
settings = {
ports.dns = 53; # Port for incoming DNS Queries.
upstreams.groups.default = [ "84.238.0.130" "84.238.6.254" "192.168.1.1" ];
# For initially solving DoH/DoT Requests when no system Resolver is available.
bootstrapDns = {
upstream = "https://one.one.one.one/dns-query";
ips = [ "1.1.1.1" "1.0.0.1" ];
};
#Enable Blocking of certian domains.
blocking = {
blackLists = {
#Adblocking
ads = ["https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"];
#Another filter for blocking adult sites
adult = ["https://blocklistproject.github.io/Lists/porn.txt"];
#You can add additional categories
slack = [ "www.youtube.com" "www.facebook.com" ];
};
#Configure what block categories are used
clientGroupsBlock = {
default = [ "ads" "slack" ];
kids-ipad = ["ads" "adult"];
};
};
};
};