mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +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;
|
||||
let
|
||||
genPrefList = {locked ? false}: prefs: concatStringsSep "\n" (
|
||||
mapAttrsToList
|
||||
(key: value: ''lockPref(${toString key}, ${builtins.toJSON value});'')
|
||||
prefs
|
||||
);
|
||||
genPrefList = {locked ? false}: prefs:
|
||||
let
|
||||
prefFuncName = if locked then "lockPref" else "user_pref";
|
||||
in
|
||||
concatStringsSep "\n" (
|
||||
mapAttrsToList
|
||||
(key: value: ''lockPref(${toString key}, ${builtins.toJSON value});'' )
|
||||
prefs
|
||||
);
|
||||
in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
|
||||
cfg = {
|
||||
smartcardSupport = true;
|
||||
|
|
@ -71,5 +75,8 @@ in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
|
|||
"network.IDN_show_punycode" = true;
|
||||
"plugins.enumerable_names" = true;
|
||||
"security.identityblock.show_extended_validation" = true;
|
||||
}
|
||||
+ "\n" + genPrefList { } {
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue