From 76059ce7260389b6e9ffa7e411b9ede61c3ccb50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 4 Aug 2025 21:45:35 +0200 Subject: [PATCH] vanadium/firefox: inline some bindings --- nix/configurations/vanadium/home/firefox.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/nix/configurations/vanadium/home/firefox.nix b/nix/configurations/vanadium/home/firefox.nix index 16b4cd7f..323d4f94 100644 --- a/nix/configurations/vanadium/home/firefox.nix +++ b/nix/configurations/vanadium/home/firefox.nix @@ -13,10 +13,7 @@ in { SearchEngines = { Default = "Google en@en"; Remove = ["Google"]; - Add = let - lrValues = ["lang_fr" "lang_en" "lang_zh-TW"]; - hlValues = ["fr" "en" "zh-TW"]; - in + Add = # Google specialized for each language x display language # reference: https://developers.google.com/custom-search/docs/xml_results?hl=zh-tw#advanced-search-query-parameters lib.mapCartesianProduct ( @@ -29,7 +26,7 @@ in { in { Name = "Google ${lr'}@${hl'}"; Alias = - if (lib.removePrefix "lang_" lr == hl) + if lib.removePrefix "lang_" lr == hl then "@G" + lr' else "@G" + lr' + hl'; Description = "Your data yum yum (but ${lr'} in ${hl'})"; @@ -37,10 +34,9 @@ in { SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}&lr=${lr}&hl=${hl}"; URLTemplate = "https://google.com/search?q=-ai+{searchTerms}&lr=${lr}&hl=${hl}"; } - ) - { - lr = lrValues; - hl = hlValues; + ) { + lr = ["lang_fr" "lang_en" "lang_zh-TW"]; + hl = ["fr" "en" "zh-TW"]; } ++ [ # Forges