firefox: support passing any json value to settings (#3580)

Firefox internally only supports bool, int, and string types for
preferences, but often stores objects, arrays and floats as strings.

This change makes it nicer to specify those type of preferences in
Nix, and it also makes it possible to merge objects & arrays across
multiple modules.
This commit is contained in:
Kira Bruneau 2023-02-05 05:23:22 -05:00 committed by GitHub
parent e3f28ddb0d
commit 9f4268e6b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 4 deletions

View file

@ -1,5 +1,6 @@
// Generated by Home Manager.
user_pref("browser.newtabpage.pinned", "[{\"title\":\"NixOS\",\"url\":\"https://nixos.org\"}]");
user_pref("general.smoothScroll", false);

View file

@ -9,7 +9,13 @@ lib.mkIf config.test.enableBig {
profiles.test = {
id = 1;
settings = { "general.smoothScroll" = false; };
settings = {
"general.smoothScroll" = false;
"browser.newtabpage.pinned" = [{
title = "NixOS";
url = "https://nixos.org";
}];
};
};
profiles.bookmarks = {