Refactor the whole configuration

Reviewed-on: #1
This commit is contained in:
caem 2025-02-01 14:05:15 +01:00
parent fb5d4d46f8
commit 6cb66d86d2
153 changed files with 2078 additions and 3094 deletions

View file

@ -0,0 +1,23 @@
let
prefToString = value:
if builtins.isBool value then
if value then "true" else "false"
else if (builtins.isInt value) || (builtins.isNull value) then
builtins.toString value
else if builtins.isString value then
''"${value}"''
else
builtins.throw
"Pref expected one of (Bool, String, Int, Null) got instead ${builtins.typeOf value}";
mkPrefs = prefs: builtins.concatStringsSep
"\n"
(builtins.attrValues
(builtins.mapAttrs
(n: v: ''pref("${n}", ${prefToString v});'') prefs));
in
mkPrefs {
"browser.urlbar.suggest.topsites" = false;
"browser.startup.homepage" = "about:blank";
"browser.download.useDownloadDir" = false;
}