From 4f05ef6a8adb5c2e9de83fee6d316ce168daf705 Mon Sep 17 00:00:00 2001 From: Zeremonienmeister Berber Date: Sat, 1 Mar 2025 14:47:21 +0000 Subject: [PATCH] firefox: fix wrong syntax grammar for search setting isAppProvided (#6556) The or operator is left associative, and since there is another argument after the first term, the interpreter tries to apply whatever the or-expression evaluates to. If the first operand is unset, it evaluates to removeAttrs, and everything is fine, but if it is set to a boolean (which is what it should be set to), then it tries to apply a boolean to arguments, and we get a type error. Bracketing explicitly with parentheses fixes this. It presumably went unnoticed because not many people have tried setting the option `programs.firefox.profiles..search.engines..isAppProvided`. --- modules/programs/firefox/profiles/search.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/firefox/profiles/search.nix b/modules/programs/firefox/profiles/search.nix index 99a22674..f0d5f5a3 100644 --- a/modules/programs/firefox/profiles/search.nix +++ b/modules/programs/firefox/profiles/search.nix @@ -48,8 +48,8 @@ let let requiredInput = { inherit name; - isAppProvided = input.isAppProvided or removeAttrs input [ "metaData" ] - == { }; + isAppProvided = + input.isAppProvided or (removeAttrs input [ "metaData" ] == { }); metaData = input.metaData or { }; }; in if requiredInput.isAppProvided then