diff options
author | Alan Pearce | 2023-03-13 20:35:57 +0100 |
---|---|---|
committer | Alan Pearce | 2023-03-14 16:30:42 +0100 |
commit | acf62d530ba983e762716ef78bd5078c4fc9778b (patch) | |
tree | fe062f63912fbaced5b4d49156deb7a19087f5f0 /system | |
parent | b0de86df156aa7828670a094a6313cd31fb59903 (diff) | |
download | nixfiles-acf62d530ba983e762716ef78bd5078c4fc9778b.tar.lz nixfiles-acf62d530ba983e762716ef78bd5078c4fc9778b.tar.zst nixfiles-acf62d530ba983e762716ef78bd5078c4fc9778b.zip |
nextdns: remove module
I don't use this on systems anymore; it's on my router now.
Diffstat (limited to 'system')
-rw-r--r-- | system/modules/nextdns.nix | 74 | ||||
-rw-r--r-- | system/settings/base.nix | 8 |
2 files changed, 0 insertions, 82 deletions
diff --git a/system/modules/nextdns.nix b/system/modules/nextdns.nix deleted file mode 100644 index 0c718d57..00000000 --- a/system/modules/nextdns.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - inherit (pkgs) stdenv; - - cfg = config.networking.nextdns; - - identifyingPrefix = - if cfg.identifyDevice - then "${config.networking.hostName}-" - else ""; - - kresdConfig = { - enable = true; - extraConfig = '' - modules = { 'hints > iterate' } - localTrees = policy.todnames({ - 'lan.', - 'home.', - '10.in-addr.arpa.', - '172.in-addr.arpa.', - '192.in-addr.arpa.' - }) - hints.add_hosts() - policy.add(policy.suffix(policy.FLAGS({'NO_CACHE'}), localTrees)) - policy.add(policy.suffix(policy.STUB({ '192.168.0.1', '192.168.1.1', '172.30.42.1', '10.0.0.1' }), localTrees)) - policy.add(policy.all(policy.TLS_FORWARD({ - {'45.90.28.0', hostname='${identifyingPrefix}${cfg.configID}.dns1.nextdns.io'}, - {'2a07:a8c0::', hostname='${identifyingPrefix}${cfg.configID}.dns1.nextdns.io'}, - {'45.90.30.0', hostname='${identifyingPrefix}${cfg.configID}.dns2.nextdns.io'}, - {'2a07:a8c1::', hostname='${identifyingPrefix}${cfg.configID}.dns2.nextdns.io'} - }))) - ''; - }; -in { - options = { - networking.nextdns.enable = mkOption { - type = types.bool; - default = false; - description = "Whether to enable DNS resolution via NextDNS"; - }; - - networking.nextdns.configID = mkOption { - type = types.str; - default = ""; - example = literalExample "abcdef"; - description = "NextDNS configuration ID"; - }; - - networking.nextdns.identifyDevice = mkOption { - type = types.bool; - default = false; - description = "Whether to send hostname for identifying in your logs"; - }; - }; - - config = mkIf cfg.enable { - assertions = [ - { - assertion = !(stdenv.isDarwin); - message = "NextDNS module is not supported on Darwin"; - } - ]; - networking = { - networkmanager.dns = "none"; - resolvconf.useLocalResolver = true; - }; - services.kresd = kresdConfig; - }; -} diff --git a/system/settings/base.nix b/system/settings/base.nix index 646e3c3e..1fa61d09 100644 --- a/system/settings/base.nix +++ b/system/settings/base.nix @@ -4,9 +4,6 @@ lib, ... }: { - imports = [ - ../modules/nextdns.nix - ]; boot.loader.timeout = lib.mkDefault 1; services.irqbalance.enable = true; @@ -17,9 +14,4 @@ programs.zsh = { histFile = "\${XDG_DATA_HOME}/zsh/history"; }; - - networking.nextdns = { - configID = "abd6e5"; - identifyDevice = true; - }; } |