summaryrefslogtreecommitdiff
path: root/machines/enzo
diff options
context:
space:
mode:
authorHenry J. Webster <hwebs@hwebs.info>2026-07-30 17:59:45 -0500
committerHenry J. Webster <hwebs@hwebs.info>2026-07-30 17:59:45 -0500
commitf09034645c101c3717afbf0ff18425b07bbd08ae (patch)
tree1858213f4f5753c1372ed836c722d4522c431477 /machines/enzo
parent24d03908557a8ccf528d3bba66bd1196941eecb8 (diff)
enzo: use native firefox preferences policy, not HM profiles
The previous commit used programs.firefox.profiles, which is a Home Manager option and does not exist in the native NixOS module — the config failed to evaluate. Switch to programs.firefox.preferences, which the module delivers as a Firefox enterprise policy applied to every profile. Covers dark chrome, blank home/new-tab, and hiding the bookmarks toolbar. Full nav/tab toolbar removal needs userChrome.css, which the native module cannot ship. Assisted-by: Claude:claude-opus-4-8
Diffstat (limited to 'machines/enzo')
-rw-r--r--machines/enzo/desktop.nix49
1 files changed, 21 insertions, 28 deletions
diff --git a/machines/enzo/desktop.nix b/machines/enzo/desktop.nix
index 338e75c..b340e7f 100644
--- a/machines/enzo/desktop.nix
+++ b/machines/enzo/desktop.nix
@@ -71,38 +71,31 @@
"input"
];
- # Firefox with declarative customizations: dark chrome, blank home/new-tab,
- # and toolbars stripped via userChrome.css. Settings here are authoritative on
- # each rebuild; anything not listed stays adjustable in the UI.
+ # Firefox customizations. The native NixOS module has no profile/userChrome
+ # support (that's Home Manager); instead `preferences` are delivered as a
+ # Firefox enterprise policy (etc/firefox/policies/policies.json), so they
+ # apply to every profile without managing one. preferencesStatus = "default"
+ # means these seed the defaults but stay overridable in the UI.
+ #
+ # This covers dark chrome, blank home/new-tab, and hiding the bookmarks
+ # toolbar. Fully removing the nav/tab toolbars needs userChrome.css, which
+ # this module can't ship — would require Home Manager or an activation hack.
programs.firefox = {
enable = true;
+ preferencesStatus = "default";
+ preferences = {
+ # Dark theme (UI chrome + toolbars)
+ "ui.systemUsesDarkTheme" = 1;
+ "browser.theme.content-theme" = 0;
+ "browser.theme.toolbar-theme" = 0;
- profiles.default = {
- isDefault = true;
+ # Blank home page + blank new tab
+ "browser.startup.homepage" = "about:blank";
+ "browser.startup.page" = 0; # 0 = blank on startup
+ "browser.newtabpage.enabled" = false;
- settings = {
- # Dark theme (UI chrome + toolbars)
- "ui.systemUsesDarkTheme" = 1;
- "browser.theme.content-theme" = 0;
- "browser.theme.toolbar-theme" = 0;
-
- # Blank home page + blank new tab
- "browser.startup.homepage" = "about:blank";
- "browser.startup.page" = 0; # 0 = blank on startup
- "browser.newtabpage.enabled" = false;
-
- # Required for userChrome.css below to load
- "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
- };
-
- # Toolbar removal. Tweak/uncomment to taste.
- userChrome = ''
- /* Bookmarks toolbar */
- #PersonalToolbar { visibility: collapse !important; }
-
- /* Whole nav + tab strip (uncomment for a truly chromeless window) */
- /* #navigator-toolbox { visibility: collapse !important; } */
- '';
+ # Hide the bookmarks toolbar
+ "browser.toolbars.bookmarks.visibility" = "never";
};
};