Adds support for Firefox forks by introducing methods that create
generic configs and options. Additional configs and options can be
added in separate modules.
This commit makes it possible to specify Firefox' extraPolicies
through:
programs.firefox.package = pkgs.firefox.override {
extraPolicies = {... }
}
This was possible in the past but was broken by:
3feeb77155
firefox: add support for specifying policies (#4626)
For some reason, Firefox completely discards the ADD_DATE and
LAST_MODIFIED attributes if they are set to 0. This has been
confirmed by exporting a sample set of bookmarks generated by
Nix using home-manager and comparing it to the same sample of
bookmarks set manually and then exported.
Missing these attributes can cause problems for extensions and
other tools that try to read bookmarks. A known example is the
Tridactyl extension.
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.
With this change, it's now possible to configure the default search
engine in Firefox with
programs.firefox.profiles.<name>.search.default
and add custom engines with
programs.firefox.profiles.<name>.search.engines.
It's also recommended to enable
programs.firefox.profiles.<name>.search.force = true
since Firefox will replace the symlink for the search configuration on
every launch, but note that you'll loose any existing configuration by
enabling this.
This replaces some derivation outputs by simple strings rather than
full Nix store paths. This removes the need to download the whole
derivation when all we need is a static string.
This makes the
programs.firefox.package
option take a pre-wrapped Firefox package as value if state version is
set to "19.09" or later. This should make the Firefox module work with
a wider range of Firefox packages.