diff --git a/nixos/common/modules/hosts.nix b/nixos/common/modules/hosts.nix index ecc24062..e13fb51d 100644 --- a/nixos/common/modules/hosts.nix +++ b/nixos/common/modules/hosts.nix @@ -1,6 +1,78 @@ -{ ... }: { - networking.extraHosts = builtins.readFile(builtins.fetchurl { - url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/everything.txt"; - sha256 = "78d393a897656c92bb0c96ff79fc99205830ce0c2a66abe33ae333ad11a8b0c5"; +{ ... }: +let + Twitter = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/twitter.txt"; + sha256 = "8393a8d75bda20f779ce0e58090ce762d086e2e2a4adefe278e9662aab6f3063"; }); + + Facebook = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/facebook.txt"; + sha256 = "7eaff1bc385c1012586021e6604c77c4f0346d2a809c775a1d82fa4294afb47a"; + }); + + TikTok = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/tiktok.txt"; + sha256 = "44e2c23e57a2e1f2b5f32d011b36895310385dcb4f1802279cca7d34558d15b0"; + }); + + Drugs = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/drugs.txt"; + sha256 = "c3b5b6ca7dbedc8e7d8aa8e071564cdeb459663f56ceaacbecb96c6697f91f47"; + }); + + Porn = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/porn.txt"; + sha256 = "211a437563d603dfe2c93cffe34f784418bdccc0a00496beae314d6c38198be0"; + }); + + Malware = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/malware.txt"; + sha256 = "68021e840fda1541ba945d47d37910b1fdaad6ebf8837273e9b1a9afdc015a45"; + }); + + Fraud = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/fraud.txt"; + sha256 = "b6f71a606149b27a16ae9b1da5fd156880214f068faf05e846ec217d215914f8"; + }); + + Ransomware = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/ransomware.txt"; + sha256 = "c90fd433d055e153fc82e1a1d183c985c65a7bbd1aa4ded1baec9a7aa8ae4a41"; + }); + + Scam = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/scam.txt"; + sha256 = "4be94ce2cbaf0649784d708d6771c6de670cf353c1edd423160d0c2925a29c3b"; + }); + + Abuse = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/abuse.txt"; + sha256 = "33eb00330df619ee7e89b087f348974c9a699912df5a36693244704eb100f5dd"; + }); + + Ads = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/ads.txt"; + sha256 = "19aebdc75324179473cb0f192570c19559c1486ae7a4620191d0af1e31769025"; + }); + + Basic = builtins.readFile(builtins.fetchUrl { + url = "https://github.com/blocklistproject/Lists/raw/f2bdd1deab05f6a22739671cc20a17444e53699f/basic.txt"; + sha256 = "1d778ada1a5fa8758aab0950a2a6750463b88dd67e0d54702bc37d63a77d2d51"; + }); + +in { + networking.extraHosts = lib.mkMerge [ + Twitter + Facebook + TikTok + Drugs + Porn + Malware + Fraud + Ransomware + Scam + Abuse + Ads + Basic + ]; } diff --git a/nixos/default.nix b/nixos/default.nix index aff90ba2..dd483c3f 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -21,7 +21,7 @@ ./common/modules/networking.nix # Initial Networking configs ./common/modules/nixos.nix # NixOS related items ./common/modules/remote-builders.nix # Add remote builders - # ./common/modules/hosts.nix # Adblockers + ./common/modules/hosts.nix # Adblockers ./users/${username} ./hosts/${hostname}