Browser — Firefox, Floorp, and the FF Ultima Theme
Purpose
programs.firefox and programs.floorp are configured together, sharing one profile, extension policies, and search engines.
Both browsers carry the FF Ultima userChrome theme.
Entry Point
- Main file:
home/shared/applications/browser.nix
FF Ultima
Version 5 of the theme dropped the old user.js model.
It now ships two halves:
- CSS — the theme files in the profile
chromedirectory.userChrome.cssimportstheme/*. - JS —
userChromeJSplus theuserChrome Companionextension, which together toggle the theme’s-moz-prefsettings.
The JS half installs through the AutoConfig mechanism, which reads two files from the browser installation directory, not the profile:
| File | Role |
|---|---|
defaults/pref/autoconfig.js | points general.config.filename at mozilla.cfg |
mozilla.cfg | privileged script run at startup |
Both are generated by the wrapFirefox builder, and the installation directory is read-only in the Nix store, so the theme cannot be copied into it.
The module extends the wrapper instead:
withUltimaAutoConfigpasses the theme’suserchromejs/firefox/config.jsthrough the wrapper argumentextraPrefsFiles, which appends it tomozilla.cfg.- The same override appends
general.config.sandbox_enabled = falsetoautoconfig.js.userChromeJSneeds parts the sandbox withholds, so the sandbox has to be off for the JS half to load.
The chrome directory is assembled with home.file links: The theme repository under chrome/firefox-ultima,
and chrome/userchromejs at the chrome root, because userChromeJS resolves its assets from there.
No theme files are copied, so the pinned flake input stays the single source of truth.
Settings
Settings are exposed as about:config preferences read by CSS -moz-pref queries, rather than through user.js.
The profile settings block sets the ones this configuration wants directly; the remaining defaults are applied by userChrome Companion on first run.
The extension is force-installed through the shared extension policies.