update concentration.nix

This commit is contained in:
Osman Faruk Bayram 2025-01-08 17:12:01 +03:00
parent b9691caf58
commit a181a11e3e

View file

@ -4,11 +4,37 @@
config, config,
... ...
}: { }: {
networking.extraHosts = '' options = {
0.0.0.0 youtube.com blockYoutube = lib.mkOption {
::0 youtube.com type = lib.types.bool;
default = false;
description = "Disables youtube using /etc/hosts file";
};
blockTwitter = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Disables twitter using /etc/hosts file";
};
};
0.0.0.0 www.youtube.com config = lib.mkMerge [
::0 www.youtube.com (lib.mkIf config.blockYoutube {
''; networking.extraHosts = ''
} 0.0.0.0 youtube.com
::0 youtube.com
0.0.0.0 www.youtube.com
::0 www.youtube.com
'';
})
(lib.mkIf config.blockTwitter {
networking.extraHosts = ''
0.0.0.0 twitter.com
::0 twitter.com
0.0.0.0 www.twitter.com
::0 www.twitter.com
'';
})
];
}