about summary refs log tree commit diff
path: root/hosts/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/configuration.nix')
-rw-r--r--hosts/configuration.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/hosts/configuration.nix b/hosts/configuration.nix
index 3ab6d38..de102bb 100644
--- a/hosts/configuration.nix
+++ b/hosts/configuration.nix
@@ -51,7 +51,14 @@
   networking = {
     hostName = hostname;
     enableIPv6 = true;
-    extraHosts = builtins.readFile "${inputs.hosts}/hosts";
+    extraHosts = let
+      hostsFile = builtins.readFile "${inputs.hosts}/hosts";
+      lines = lib.splitString "\n" hostsFile;
+      blacklist = [ "mixpanel.com" "mxpnl.com" ];
+      filtered = builtins.filter (line:
+        builtins.all (domain: !(lib.hasInfix domain line)) blacklist
+      ) lines;
+    in lib.concatStringsSep "\n" filtered;
     dhcpcd.enable = true;
     resolvconf.enable = true;
     firewall = {