nix/nixos/common/modules/hosts.nix
2024-08-14 17:53:03 +09:00

72 lines
2.9 KiB
Nix

{ lib, ... }:
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";
});
in {
networking.extraHosts = lib.mkMerge [
Twitter
Facebook
TikTok
Drugs
Porn
Malware
Fraud
Ransomware
Scam
Abuse
Ads
];
}