diff --git a/flake.nix b/flake.nix index 19da47aa..e5fc36e5 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,9 @@ # disko - Declarative Disk Partitioning disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; + # Firefox theme, for "Gradience" GTK Theming + firefox-gnome-theme.url = "github:rafaelmardojai/firefox-gnome-theme"; + firefox-gnome-theme.flake = false; }; outputs = { self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, ... } @inputs: let diff --git a/home-manager/common/software/gui/firefox.nix b/home-manager/common/software/gui/firefox.nix index 284116cb..6ca79f0b 100644 --- a/home-manager/common/software/gui/firefox.nix +++ b/home-manager/common/software/gui/firefox.nix @@ -1,12 +1,30 @@ { config, pkgs, theme, ... }: { - imports = [ ./themes/${theme}/firefox-theme.nix ]; + + home.file.".mozilla/firefox/nix-user-profile/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme; + programs.firefox = { enable = true; profiles.default = { isDefault = true; name = "default"; + userChrome = '' + @import "firefox-gnome-theme/userChrome.css"; + ''; + userContent = '' + @import "firefox-gnome-theme/userContent.css"; + ''; + + # https://discourse.nixos.org/t/anyone-using-firefox-gnome-theme-successfully-with-nixos-home-manager/19248/3 + settings = { + ## Firefox gnome theme ## - https://github.com/rafaelmardojai/firefox-gnome-theme/blob/7cba78f5216403c4d2babb278ff9cc58bcb3ea66/configuration/user.js + # (copied into here because home-manager already writes to user.js) + "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 + }; # https://nur.nix-community.org/repos/rycee/ extensions = with pkgs.nur.repos; [ @@ -18,8 +36,6 @@ rycee.firefox-addons.link-cleaner rycee.firefox-addons.adnauseam rycee.firefox-addons.censor-tracker - - federicoschonborn.firefox-gnome-theme ]; search.default = "DuckDuckGo";