mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 16:39:07 +01:00
firefox: Set default search engine to self hosted searxng
This commit is contained in:
parent
fafd352b53
commit
526937eb39
1 changed files with 20 additions and 0 deletions
|
|
@ -40,6 +40,16 @@ in
|
|||
|> lib.map (glance: glance.domain)
|
||||
|> lib.head;
|
||||
};
|
||||
searchEngine = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default =
|
||||
allHosts
|
||||
|> lib.attrValues
|
||||
|> lib.map (host: host.config.custom.web-services.searxng)
|
||||
|> lib.filter (searxng: searxng.enable)
|
||||
|> lib.map (searxng: searxng.domain)
|
||||
|> lib.head;
|
||||
};
|
||||
extensions = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
|
|
@ -115,6 +125,16 @@ in
|
|||
};
|
||||
|
||||
extraConfig = lib.readFile "${inputs.betterfox}/user.js";
|
||||
|
||||
search = {
|
||||
force = true;
|
||||
default = "searxng";
|
||||
privateDefault = "searxng";
|
||||
engines.searxng = {
|
||||
name = "searxng";
|
||||
urls = lib.singleton { template = "https://${cfg.searchEngine}/search?q={searchTerms}"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
policies.ExtensionSettings =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue