Summary Files Commits Branches @commit @diff @stats
path: root / modules / server / dnsmasq.nix
blob: 3eec573079bc2f6d1ad823341fd45e9bb98b1ea0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ pkgs, ... }: {
  networking.firewall = {
    allowedTCPPorts = [ 53 ];
    allowedUDPPorts = [ 53 ];
  };
  services.dnsmasq = {
    enable = true;
    alwaysKeepRunning = true;
    settings = {
      addn-hosts = [
        "/etc/hosts"
        (pkgs.stevenblack-blocklist + "/hosts")
      ];
      server = [
        "1.1.1.1"
        "1.0.0.1"
        "8.8.8.8"
        "8.8.4.4"
      ];
    };
  };
}