add librewolf with gnome theme

This commit is contained in:
MeexReay 2025-09-07 15:23:04 +03:00
parent 5f2f8b8983
commit 8443ea1db1
5 changed files with 58 additions and 15 deletions

17
flake.lock generated
View File

@ -19,6 +19,22 @@
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1756083905,
"narHash": "sha256-UqYGTBgI5ypGh0Kf6zZjom/vABg7HQocB4gmxzl12uo=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "b655eaf16d4cbec9c3472f62eee285d4b419a808",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1733328505,
@ -190,6 +206,7 @@
"root": {
"inputs": {
"envfetch": "envfetch",
"firefox-gnome-theme": "firefox-gnome-theme",
"home-manager": "home-manager",
"nix-flatpak": "nix-flatpak",
"nixcord": "nixcord",

View File

@ -8,6 +8,7 @@
nixcord.url = "github:KaylorBen/nixcord/411d48a6";
nix-flatpak.url = "github:gmodena/nix-flatpak";
envfetch.url = "github:locomiadev/envfetch";
firefox-gnome-theme = { url = "github:rafaelmardojai/firefox-gnome-theme"; flake = false; };
};
outputs = inputs@{ nixpkgs, home-manager, ... }: {
@ -30,7 +31,7 @@
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
home-manager.backupFileExtension = "backup90";
home-manager.backupFileExtension = "backup92";
}
];
};

View File

@ -5,6 +5,7 @@
./discord.nix
./java.nix
./fonts.nix
./firefox.nix
];
home.packages = with pkgs; [
@ -109,7 +110,6 @@
# internet
spotify
firefox-bin
telegram-desktop
(chromium.override { enableWideVine = true; })
revolt-desktop
@ -217,18 +217,6 @@
};
};
# # declarative firefox installation
#
# programs.firefox = {
# enable = true;
# profiles.default = {
# isDefault = true;
# name = "default";
# search.default = "ddg";
# search.privateDefault = "ddg";
# };
# };
xdg.mimeApps.defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";

View File

@ -0,0 +1,36 @@
{ inputs, pkgs, ... }:
{
# declarative firefox installation
programs.librewolf = {
enable = true;
package = pkgs.librewolf-bin;
profiles.default = {
isDefault = true;
name = "default";
search.default = "ddg";
search.privateDefault = "ddg";
userChrome = ''
@import "firefox-gnome-theme/userChrome.css";
'';
userContent = ''
@import "firefox-gnome-theme/userContent.css";
'';
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
};
};
};
home.file.".librewolf/default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
}

View File

@ -129,7 +129,7 @@
"${modifier}+Print" = "exec flameshot gui --raw | feh --auto-zoom --scale-down -";
"${modifier}+c" = "exec copyq toggle";
"${modifier}+o" = "exec gnome-calculator";
"${modifier}+i" = "exec firefox";
"${modifier}+i" = "exec librewolf";
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
@ -196,6 +196,7 @@
(video (app_id "mpv"))
(video (app_id "vlc"))
(video (app_id "firefox"))
(video (app_id "librewolf"))
(video (app_id "org.telegram.desktop"))
(video {instance = "chromium";})
(video (class "firefox"))