aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix20
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;