summaryrefslogtreecommitdiff
path: root/home-manager/features/gui/apps/librewolf/librewolf.nix
diff options
context:
space:
mode:
authortriethyl <triethylammonium@pm.me>2026-01-28 15:10:41 -0500
committertriethyl <triethylammonium@pm.me>2026-01-28 15:10:41 -0500
commit59d885199e5840c1d266a6bfd2b9ae5fcf09957c (patch)
tree908d4e89a2573e85dc3334d769aa09b3955bdc0b /home-manager/features/gui/apps/librewolf/librewolf.nix
parentec74e028dda1eef2bbf9964066bc58942e273712 (diff)
home-manager: configured librewolf
Diffstat (limited to 'home-manager/features/gui/apps/librewolf/librewolf.nix')
-rw-r--r--home-manager/features/gui/apps/librewolf/librewolf.nix95
1 files changed, 95 insertions, 0 deletions
diff --git a/home-manager/features/gui/apps/librewolf/librewolf.nix b/home-manager/features/gui/apps/librewolf/librewolf.nix
new file mode 100644
index 0000000..210cf49
--- /dev/null
+++ b/home-manager/features/gui/apps/librewolf/librewolf.nix
@@ -0,0 +1,95 @@
+{
+ config,
+ pkgs,
+ lib,
+ inputs,
+ ...
+}: let
+ cfg = config.features.gui.apps.librewolf;
+in {
+ # After enabling this feature, make sure to enable the extensions in the menu button and give them private browsing access. Also make sure to enable dark theme and log into firefox sync account.
+
+ options.features.gui.apps.librewolf.enable = lib.mkEnableOption "librewolf";
+ config = lib.mkIf cfg.enable {
+ programs.librewolf = {
+ enable = true;
+ policies = {
+ # Copied from librewolf policies but don't remove google.
+ SearchEngines.Remove = [
+ "Bing"
+ "Amazon.com"
+ "eBay"
+ "Twitter"
+ "Perplexity"
+ ];
+ };
+ settings = {
+ # UI Customizations
+ "browser.tabs.inTitlebar" = 0; # Use system window bar.
+ "browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":["privatebrowsing-button","bookmarks-menu-button","logins-button","print-button"],"unified-extensions-area":[],"nav-bar":["back-button","stop-reload-button","forward-button","vertical-spacer","urlbar-container","downloads-button","fxa-toolbar-menu-button","unified-extensions-button","ublock0_raymondhill_net-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","firefox-view-button","alltabs-button"],"vertical-tabs":[],"PersonalToolbar":["personal-bookmarks"]},"seen":["developer-button","screenshot-button","ublock0_raymondhill_net-browser-action"],"dirtyAreaCache":["nav-bar","vertical-tabs","toolbar-menubar","TabsToolbar","PersonalToolbar","widget-overflow-fixed-list"],"currentVersion":23,"newElementCount":4}''; # Organize toolbar.
+
+ # Themeing Options
+
+ # User Chrome and Content
+ "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
+
+ # Required by simplefox theme
+ "layers.acceleration.force-enabled" = true;
+ "gfx.webrender.all" = true;
+ "svg.context-properties.content.enabled" = true;
+
+ # Don't automatically disable sideloaded extensions.
+ "extensions.autoDisableScopes" = 0;
+
+ # Passwords
+ "signon.rememberSignons" = true;
+ "signon.autofillForms" = true;
+
+ # Sync
+ "identity.fxaccounts.enabled" = true;
+ "identity.fxaccounts.account.device.name" = config.home.username;
+
+ "services.sync.username" = "lucaschapple@posteo.com";
+
+ "services.sync.engine.bookmarks" = true;
+ "services.sync.engine.history" = true;
+ "services.sync.engine.tabs" = false;
+ "services.sync.engine.passwords" = true;
+ "services.sync.engine.addresses" = true;
+ "services.sync.engine.creditcards" = true;
+ "services.sync.engine.addons" = false;
+ "services.sync.engine.prefs" = false;
+
+ # Enable WebGL
+ "webgl.disabled" = false;
+ };
+ profiles."default" = {
+ isDefault = true;
+ # userChrome = builtins.readFile ./theme/userChrome.css;
+ # userContent = builtins.readFile ./theme/userContent.css;
+ search = {
+ force = true;
+ default = "ddg";
+ # default = "g";
+ engines = {
+ nix-search = {
+ name = "Nix Search";
+ urls = [{ template = "https://mynixos.com/search?q={searchTerms}"; }];
+ icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
+ definedAliases = [ "@n" ];
+ };
+ };
+ };
+ extensions = {
+ force = true;
+ packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
+ youtube-shorts-block
+ sponsorblock
+ tab-stash
+ vimium-c
+ ];
+ };
+ };
+ };
+ };
+}