From 6b0afb428e90f991c23fc8122d43cf24fdd0bb38 Mon Sep 17 00:00:00 2001 From: EsVagy42 Date: Wed, 29 Oct 2025 12:29:55 +0100 Subject: [PATCH] Added no_yt specialisation --- commit_text | 2 +- configuration.nix | 55 ++++++++++++++++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/commit_text b/commit_text index 902e24e..d64b41d 100644 --- a/commit_text +++ b/commit_text @@ -1 +1 @@ -Added shortcut for stopping and continuing programs +Added no_yt specialisation diff --git a/configuration.nix b/configuration.nix index c7cbe4c..5fdc912 100644 --- a/configuration.nix +++ b/configuration.nix @@ -346,12 +346,9 @@ in networking.nameservers = [ ]; - specialisation = { - productive = { - inheritParentConfig = true; - configuration = { - environment.systemPackages = basePackages; - programs.steam.enable = lib.mkOverride 99 false; + specialisation = + let + blocky_config = blocked_domains: { services.blocky = { enable = lib.mkOverride 99 true; settings = { @@ -370,15 +367,7 @@ in #Enable Blocking of certian domains. blocking = { blackLists = { - unproductive = [ - '' - | - www.youtube.com - tilvids.com - mastodon.social - underhound.eu - '' - ]; + unproductive = [ blocked_domains ]; }; #Configure what block categories are used clientGroupsBlock = { @@ -389,7 +378,39 @@ in }; networking.nameservers = lib.mkOverride 99 [ "127.0.0.1" ]; }; + unproductive_sites_addresses = '' + tilvids.com + mastodon.social + underhound.eu + ''; + youtube_address = "www.youtube.com"; + in + { + productive = { + inheritParentConfig = true; + configuration = { + environment.systemPackages = basePackages; + programs.steam.enable = lib.mkOverride 99 false; + } + // blocky_config ( + lib.strings.concatStringsSep "\n" [ + "|" + unproductive_sites_addresses + youtube_address + ] + ); + }; + no_yt = { + inheritParentConfig = true; + configuration = { + environment.systemPackages = basePackages ++ unproductivePackages; + } + // blocky_config ( + lib.strings.concatStringsSep "\n" [ + "|" + youtube_address + ] + ); + }; }; - }; - }