diff --git a/flake.lock b/flake.lock index 238c22b..c00cfcd 100644 --- a/flake.lock +++ b/flake.lock @@ -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", diff --git a/flake.nix b/flake.nix index 0565b65..b755774 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; } ]; }; diff --git a/modules/packages/default.nix b/modules/packages/default.nix index 92c32d0..57057b6 100644 --- a/modules/packages/default.nix +++ b/modules/packages/default.nix @@ -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"; diff --git a/modules/packages/firefox.nix b/modules/packages/firefox.nix new file mode 100644 index 0000000..53c3784 --- /dev/null +++ b/modules/packages/firefox.nix @@ -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; +} diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 32999b0..9927565 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -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"))