citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

dnsmasq-adblock.nix (729B)


      1 { config, lib, pkgs, ... }:
      2 let
      3   adblock-hosts = pkgs.fetchurl {
      4                     url    = "https://jb55.com/s/ad-sources.txt";
      5                     sha256 = "d9e6ae17ecc41eb7021c0552548a1c8da97efbb61e3a750fb023674d01d81134";
      6                   };
      7   dnsmasq-adblock = pkgs.fetchurl {
      8                       url = "https://jb55.com/s/dnsmasq-ad-sources.txt";
      9                       sha256 = "3b34e565fb240c4ac1d261cb223bdc2d992fa755b5f6e981144e5b18f96f260d";
     10                     };
     11 in
     12 {
     13   services.dnsmasq.enable = true;
     14   services.dnsmasq.resolveLocalQueries = false;
     15   services.dnsmasq.servers = ["8.8.8.8" "1.1.1.1"];
     16   services.dnsmasq.extraConfig = ''
     17     addn-hosts=${adblock-hosts}
     18     conf-file=${dnsmasq-adblock}
     19   '';
     20 }