summary refs log tree commit diff stats
path: root/system/settings
diff options
context:
space:
mode:
Diffstat (limited to 'system/settings')
-rw-r--r--system/settings/base.nix12
-rw-r--r--system/settings/hardware/network-manager.nix8
-rw-r--r--system/settings/services/kresd.nix22
3 files changed, 11 insertions, 31 deletions
diff --git a/system/settings/base.nix b/system/settings/base.nix
index 9e94a5a2..8f0c32b2 100644
--- a/system/settings/base.nix
+++ b/system/settings/base.nix
@@ -1,11 +1,21 @@
 { config, pkgs, ... }:
 
-{ boot.loader.timeout = 1;
+{
+  imports = [
+    ../modules/nextdns.nix
+  ];
+  boot.loader.timeout = 1;
 
   environment.systemPackages = with pkgs; [
     nix-index
   ];
 
+  networking.nextdns = {
+    enable = true;
+    configID = "abd6e5";
+    identifyDevice = true;
+  };
+
   networking.extraHosts = ''
     127.0.0.1 ${config.networking.hostName}
     ::1 ${config.networking.hostName}
diff --git a/system/settings/hardware/network-manager.nix b/system/settings/hardware/network-manager.nix
index 4daea7be..6ab0c818 100644
--- a/system/settings/hardware/network-manager.nix
+++ b/system/settings/hardware/network-manager.nix
@@ -1,17 +1,9 @@
 { config, lib, pkgs, ... }:
 
 {
-  imports = [
-    ../services/kresd.nix
-  ];
-
   networking = {
     networkmanager = {
       enable = true;
-      dns = lib.mkForce "none";
-    };
-    resolvconf = {
-      useLocalResolver = true;
     };
   };
 
diff --git a/system/settings/services/kresd.nix b/system/settings/services/kresd.nix
deleted file mode 100644
index 335d96cc..00000000
--- a/system/settings/services/kresd.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
-  nextdnsConfig = "abd6e5";
-  hostname = config.networking.hostName;
-in
-{
-  services.kresd = {
-    enable = true;
-    extraConfig = ''
-      cache.size = 100*MB
-      cache.min_ttl(3 * 3600)
-
-      policy.add(policy.all(policy.TLS_FORWARD({
-        {'45.90.28.0', hostname='${hostname}-${nextdnsConfig}.dns1.nextdns.io'},
-        {'2a07:a8c0::', hostname='${hostname}-${nextdnsConfig}.dns1.nextdns.io'},
-        {'45.90.30.0', hostname='${hostname}-${nextdnsConfig}.dns2.nextdns.io'},
-        {'2a07:a8c1::', hostname='${hostname}-${nextdnsConfig}.dns2.nextdns.io'}
-      })))
-    '';
-  };
-}