fixed?
This commit is contained in:
parent
965f7c0a09
commit
fdc80061c3
1 changed files with 13 additions and 4 deletions
|
@ -1,12 +1,21 @@
|
|||
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: ''user_pref("${n}", "${v}");'') prefs));
|
||||
(n: v: ''user_pref("${n}", "${(prefToString v)}");'') prefs));
|
||||
in
|
||||
mkPrefs {
|
||||
prefs = {
|
||||
"browser.urlbar.suggest.topsites" = false;
|
||||
};
|
||||
"browser.urlbar.suggest.topsites" = "false";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue