update firefox config to automatically apply gnome theme

This commit is contained in:
Michael Thomas 2023-03-06 15:39:11 -05:00
parent 7403f5b846
commit 867d0740e2
3 changed files with 31 additions and 8 deletions

View File

@ -26,8 +26,6 @@
environment.systemPackages = with pkgs; [
wget
micro
firefox
chromium
gnome.gnome-tweaks
];

View File

@ -1,8 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
../../modules/dev.nix
../../modules/firefox.nix
../../modules/fonts.nix
../../modules/git.nix
../../modules/git_nixos.nix
@ -11,10 +11,5 @@
../../modules/zsh.nix
];
home.packages = with pkgs; [
firefox
# foxitreader
];
home.stateVersion = "21.05";
}

30
user/modules/firefox.nix Normal file
View File

@ -0,0 +1,30 @@
{ pkgs, ... }:
{
# Add Firefox GNOME theme directory
home.file."firefox-gnome-theme" = {
target = ".mozilla/firefox/default/chrome/firefox-gnome-theme";
source = pkgs.fetchFromGitHub {
owner = "rafaelmardojai";
repo = "firefox-gnome-theme";
rev = "v110";
hash = "sha256-2KKntUo0uYCXZrnaB5Q7bf97+tUL3UiuyDtTlyjbXFo=";
};
};
programs.firefox = {
enable = true;
profiles.default = {
name = "Default";
settings = {
# For Firefox GNOME theme:
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.tabs.drawInTitlebar" = true;
"svg.context-properties.content.enabled" = true;
};
userChrome = ''
@import "firefox-gnome-theme/userChrome.css";
@import "firefox-gnome-theme/theme/colors/dark.css";
'';
};
};
}