mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Packages/Firefox] Generate prefs according to value of 'locked'
This commit is contained in:
parent
6b2e927fa3
commit
23e11dd2c2
1 changed files with 12 additions and 5 deletions
|
|
@ -3,11 +3,15 @@
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
genPrefList = {locked ? false}: prefs: concatStringsSep "\n" (
|
genPrefList = {locked ? false}: prefs:
|
||||||
mapAttrsToList
|
let
|
||||||
(key: value: ''lockPref(${toString key}, ${builtins.toJSON value});'')
|
prefFuncName = if locked then "lockPref" else "user_pref";
|
||||||
prefs
|
in
|
||||||
);
|
concatStringsSep "\n" (
|
||||||
|
mapAttrsToList
|
||||||
|
(key: value: ''lockPref(${toString key}, ${builtins.toJSON value});'' )
|
||||||
|
prefs
|
||||||
|
);
|
||||||
in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
|
in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
|
||||||
cfg = {
|
cfg = {
|
||||||
smartcardSupport = true;
|
smartcardSupport = true;
|
||||||
|
|
@ -71,5 +75,8 @@ in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
|
||||||
"network.IDN_show_punycode" = true;
|
"network.IDN_show_punycode" = true;
|
||||||
"plugins.enumerable_names" = true;
|
"plugins.enumerable_names" = true;
|
||||||
"security.identityblock.show_extended_validation" = true;
|
"security.identityblock.show_extended_validation" = true;
|
||||||
|
}
|
||||||
|
+ "\n" + genPrefList { } {
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue