Skip to content

Commit adb3fed

Browse files
committed
adguardhome + unbound
1 parent 83171c6 commit adb3fed

File tree

1 file changed

+151
-8
lines changed

1 file changed

+151
-8
lines changed

nix/configuration.nix

Lines changed: 151 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
...
66
}: let
77
vi = import ./../pub/vi/nix/default.nix {};
8+
dns = ["8.8.8.8" "8.8.4.4"];
89
unst = import ./nixpkgs-unstable.nix;
910
# xkb = pkgs.writeText "xkb-layout" (builtins.readFile ./../cfg/.Xmodmap);
1011
# yewtube = import ./yewtube.nix;
@@ -49,16 +50,9 @@
4950
"delfi.ee"
5051
"postimees.ee"
5152
"rumble.com"
52-
"twitter.com"
53-
"twitch.tv"
54-
"discord.com"
5553
"odysee.com"
5654
"bastyon.com"
5755
"bitchute.com"
58-
"youtube.com"
59-
"facebook.com"
60-
# "telegram.org"
61-
# "t.me"
6256
]
6357
else []
6458
));
@@ -380,6 +374,155 @@ in {
380374
jack.enable = true;
381375
};
382376

377+
#
378+
# Productivity
379+
#
380+
services.unbound.enable = config.services.functora.blockHosts;
381+
services.unbound.settings.server.interface = ["127.0.0.1"];
382+
services.unbound.settings.server.port = 5335;
383+
services.adguardhome.enable = config.services.functora.blockHosts;
384+
services.adguardhome.mutableSettings = false;
385+
services.adguardhome.settings.dns.upstream_dns = ["127.0.0.1:5335"];
386+
services.adguardhome.settings.dns.bootstrap_dns = dns;
387+
services.adguardhome.settings.filtering = {
388+
filtering_enabled = true;
389+
blocked_services.ids = [
390+
"4chan"
391+
"500px"
392+
"9gag"
393+
"activision_blizzard"
394+
"aliexpress"
395+
"amazon_streaming"
396+
"amazon"
397+
"amino"
398+
"apple_streaming"
399+
"battle_net"
400+
"betano"
401+
"betfair"
402+
"betway"
403+
"bigo_live"
404+
"bilibili"
405+
"blaze"
406+
"blizzard_entertainment"
407+
"bluesky"
408+
"box"
409+
"claro"
410+
"cloudflare"
411+
"clubhouse"
412+
"coolapk"
413+
"crunchyroll"
414+
"dailymotion"
415+
"deezer"
416+
"directvgo"
417+
"discord"
418+
"discoveryplus"
419+
"disneyplus"
420+
"douban"
421+
"dropbox"
422+
"ebay"
423+
"electronic_arts"
424+
"epic_games"
425+
"espn"
426+
"facebook"
427+
"fifa"
428+
"flickr"
429+
"globoplay"
430+
"gog"
431+
"hbomax"
432+
"hulu"
433+
"icloud_private_relay"
434+
"iheartradio"
435+
"imgur"
436+
"instagram"
437+
"iqiyi"
438+
"kakaotalk"
439+
"kik"
440+
"kook"
441+
"lazada"
442+
"leagueoflegends"
443+
"line"
444+
"linkedin"
445+
"lionsgateplus"
446+
"looke"
447+
"mail_ru"
448+
"mastodon"
449+
"mercado_libre"
450+
"minecraft"
451+
"nebula"
452+
"netflix"
453+
"nintendo"
454+
"nvidia"
455+
"ok"
456+
"olvid"
457+
"onlyfans"
458+
"origin"
459+
"paramountplus"
460+
"pinterest"
461+
"playstation"
462+
"plenty_of_fish"
463+
"plex"
464+
"pluto_tv"
465+
"privacy"
466+
"qq"
467+
"rakuten_viki"
468+
"reddit"
469+
"riot_games"
470+
"roblox"
471+
"rockstar_games"
472+
"samsung_tv_plus"
473+
"shein"
474+
"shopee"
475+
"signal"
476+
"skype"
477+
"snapchat"
478+
# "soundcloud"
479+
"spotify"
480+
"steam"
481+
"telegram"
482+
"temu"
483+
"tidal"
484+
"tiktok"
485+
"tinder"
486+
"tumblr"
487+
"twitch"
488+
"twitter"
489+
"ubisoft"
490+
"valorant"
491+
"viber"
492+
"vimeo"
493+
"vk"
494+
"voot"
495+
"wargaming"
496+
"wechat"
497+
"weibo"
498+
"whatsapp"
499+
"wizz"
500+
"xboxlive"
501+
"xiaohongshu"
502+
"youtube"
503+
"yy"
504+
"zhihu"
505+
];
506+
blocked_services.schedule = let
507+
unBlock = {
508+
start = "20h";
509+
end = "23h";
510+
};
511+
in {
512+
mon = unBlock;
513+
tue = unBlock;
514+
wed = unBlock;
515+
thu = unBlock;
516+
fri = unBlock;
517+
sat = unBlock;
518+
sun = unBlock;
519+
time_zone = "Local";
520+
};
521+
};
522+
523+
#
524+
# Keyboards
525+
#
383526
hardware.keyboard.qmk.enable = true;
384527

385528
#
@@ -513,7 +656,7 @@ in {
513656
services.fail2ban.enable = true;
514657
services.tor.client.enable = true;
515658
networking.firewall.enable = true;
516-
networking.nameservers = ["8.8.8.8" "8.8.4.4"];
659+
networking.nameservers = dns;
517660
virtualisation.virtualbox.host.enable = true;
518661
virtualisation.containers.enable = true;
519662
virtualisation.podman.enable = true;

0 commit comments

Comments
 (0)