about summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-09-16 19:39:40 +0200
committerBaitinq <[email protected]>2025-09-16 20:15:24 +0200
commit11be857185d82e3b254b5a294729039935785c64 (patch)
tree27fba7d3fd6c478f9ca462230a3b1eb82a7d22f2 /hosts
parentHosts: Phobos: Replace minecraft with prismlauncher (diff)
downloadnixos-config-11be857185d82e3b254b5a294729039935785c64.tar.gz
nixos-config-11be857185d82e3b254b5a294729039935785c64.tar.bz2
nixos-config-11be857185d82e3b254b5a294729039935785c64.zip
Hosts: Remove mixpanel from hosts file
Diffstat (limited to 'hosts')
-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 = {