From 11be857185d82e3b254b5a294729039935785c64 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Tue, 16 Sep 2025 19:39:40 +0200 Subject: Hosts: Remove mixpanel from hosts file --- hosts/configuration.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'hosts') 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 = { -- cgit 1.4.1