{ config, lib, pkgs, inputs, ... }: with lib; with lib.my; let cfg = config.modules.desktop.browsers.firefox; in { options.modules.desktop.browsers.firefox = { enable = mkBoolOpt false; }; config = mkIf cfg.enable { home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme; home.programs.firefox = { enable = true; profiles.Default = { search = { default = "DuckDuckGo"; force = true; }; userChrome = '' @import "firefox-gnome-theme/userChrome.css"; ''; userContent = '' @import "firefox-gnome-theme/userContent.css"; ''; settings = { "toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Enable customChrome.cs "browser.uidensity" = 0; # Set UI density to normal "svg.context-properties.content.enabled" = true; # Enable SVG context-propertes "browser.theme.dark-private-windows" = false; # Disable private window dark theme }; }; }; }; }