diff options
author | tilpner | 2020-05-18 13:04:08 +0200 |
---|---|---|
committer | tilpner | 2020-05-18 13:04:08 +0200 |
commit | 63528355a9b9f492809a777d9ac8d6e529688b02 (patch) | |
tree | b8bd0610980dd55521fe0d58c6830674770635d3 /default.nix | |
parent | 9e60a30afa8aef1fd2258a0217b02cdb3bd123a5 (diff) | |
download | firefox-profiles-63528355a9b9f492809a777d9ac8d6e529688b02.tar.gz firefox-profiles-63528355a9b9f492809a777d9ac8d6e529688b02.tar.xz firefox-profiles-63528355a9b9f492809a777d9ac8d6e529688b02.zip |
Patch custom qwantjunior addon into omni.ja
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/default.nix b/default.nix index 8fdf3e1..b7f291e 100644 --- a/default.nix +++ b/default.nix @@ -55,6 +55,26 @@ in rec { bundleConfig = { inherit (config) policies; preferences = ffLib.flattenAttrs config.preferences; + + # This is very hacky, but Firefox really resists setting the default search engine + # by any other means. Only builtin search engines are allowed to make themselves default + # without prompting for user consent. + patchOmniJaCommand = + let searchEnginesInfo = { + default = { + searchDefault = "qwantjunior"; + searchOrder = [ "qwantjunior" "ddg" ]; + visibleDefaultEngines = [ "qwantjunior" "ddg" ]; + }; + regionOverrides = {}; + locales = {}; + }; + in '' + pushd chrome/browser/search-extensions + cp -r ${profiles/addons/qwantjunior} ./qwantjunior + cp ${builtins.toFile "list.json" (builtins.toJSON searchEnginesInfo)} list.json + popd + ''; }; bundle = ffLib.bundle bundleConfig; |