-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
firefox: add firefox-gnome-theme #702
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the silly question, but how do I test this theme with the following patch when profileNames
is on its default value:
commit 64059ce04de4750e498403a1cb2edca3b16f8cd6
Author: NAHO <[email protected]>
Date: 2025-01-02 19:29:57 +0100
stylix: enable Firefox GNOME theme
diff --git a/flake.lock b/flake.lock
index ea850645..174b043d 100644
--- a/flake.lock
+++ b/flake.lock
@@ -128,6 +128,22 @@
"type": "github"
}
},
+ "firefox-gnome-theme": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1734969791,
+ "narHash": "sha256-A9PxLienMYJ/WUvqFie9qXrNC2MeRRYw7TG/q7DRjZg=",
+ "owner": "rafaelmardojai",
+ "repo": "firefox-gnome-theme",
+ "rev": "92f4890bd150fc9d97b61b3583680c0524a8cafe",
+ "type": "github"
+ },
+ "original": {
+ "owner": "rafaelmardojai",
+ "repo": "firefox-gnome-theme",
+ "type": "github"
+ }
+ },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@@ -578,6 +594,7 @@
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
+ "firefox-gnome-theme": "firefox-gnome-theme",
"flake-compat": [],
"flake-utils": [
"flake-utils"
@@ -597,15 +614,16 @@
"tinted-tmux": "tinted-tmux"
},
"locked": {
- "lastModified": 1733262405,
- "narHash": "sha256-/AT315It87ll6mlZLYcmfoe6Uogx9MjPBCCZZZTq8xY=",
- "owner": "danth",
+ "lastModified": 1735834808,
+ "narHash": "sha256-6cKEhlS4Kx0RqRnDKrAfOLh6Xp678aJQ7hr8XGoRpKs=",
+ "owner": "brckd",
"repo": "stylix",
- "rev": "ffba1f1bab63ea49541f812c72a4fcf305461d67",
+ "rev": "86b40128f6196dff357c99c400ec351a763c5843",
"type": "github"
},
"original": {
- "owner": "danth",
+ "owner": "brckd",
+ "ref": "firefox/add-firefox-gnome-theme",
"repo": "stylix",
"type": "github"
}
diff --git a/flake.nix b/flake.nix
index 998409de..027e76e9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -136,7 +136,7 @@
systems.follows = "systems";
};
- url = "github:danth/stylix";
+ url = "github:brckd/stylix/firefox/add-firefox-gnome-theme";
};
systems.url = "github:nix-systems/default";
diff --git a/modules/inputs/stylix/default.nix b/modules/inputs/stylix/default.nix
index a846fb8a..d6dd0005 100644
--- a/modules/inputs/stylix/default.nix
+++ b/modules/inputs/stylix/default.nix
@@ -54,6 +54,7 @@
};
polarity = "dark";
+ targets.librewolf.firefoxGnomeTheme.enable = true;
};
};
}
@trueNAHO That's not a silly question actually. The theme alongside the Firefox module's other tweaks is only applied to the profiles specified in {
programs.firefox.profiles."naho" = {
# Default profile if not specified otherwise. Additional profiles require `id` to be set.
name = "NAHO";
};
stylix.targets.firefox.profileNames = [ "naho" ];
} Perhaps we should create a separate PR that declares a warning when the Firefox module is used without any specified |
I have already brought this up with stylix/modules/firefox/testbed.nix Line 19 in e0a41d3
in the following discussion:
I am still unsure whether we should apply some profile by default or use |
Both are valid options but out of scope for this PR IMO. Did you get your testcase working? I could also add a testbed as recommended by the discussion you just linked. |
Agreed.
I did not try it out yet.
That might be even better. |
86b4012
to
22fe6a4
Compare
Co-authored-by: NAHO <[email protected]>
Co-authored-by: NAHO <[email protected]>
22fe6a4
to
c27d1d3
Compare
Is anything stopping this from being merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in a modified version of the testbed with this option enabled; everything seems to be working perfectly.
(Having a ready made testbed with this enabled would be nice, but is not a requirement for this PR. This is complicated by the fact that the testbed system currently only supports one configuration per module.)
Is this suitable to backport to release-24.11
? I would love to use this in my own configuration. [Edit: see #753]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is anything stopping this from being merged?
Sorry for the delay.
I have tested this PR in my setup with the following commit:
commit ee42e874bff9adab167cfb0144554bb5d2e8bb43
Author: NAHO <[email protected]>
Date: 2025-01-06 23:00:45 +0100
librewolf: enable Firefox GNOME theme
diff --git a/modules/inputs/home-manager/programs/librewolf/default.nix b/modules/inputs/home-manager/programs/librewolf/default.nix
index e39d55a0..55865a20 100644
--- a/modules/inputs/home-manager/programs/librewolf/default.nix
+++ b/modules/inputs/home-manager/programs/librewolf/default.nix
@@ -3,11 +3,35 @@
lib,
...
}: {
+ imports = [../../../stylix];
+
options.dotfiles.inputs.home-manager.programs.librewolf.enable =
lib.dotfiles.mkEnableOption;
config =
lib.mkIf
config.dotfiles.inputs.home-manager.programs.librewolf.enable
- {programs.librewolf.enable = true;};
+ (
+ lib.mkMerge [
+ (
+ let
+ # The profile name of the firefox derivatives is a leaky
+ # encapsulation as mentioned in [1].
+ #
+ # [1]: https://github.com/danth/stylix/pull/702#issuecomment-2569747876
+ profile = "stylix";
+ in {
+ dotfiles.inputs.stylix.enable = true;
+ programs.librewolf.profiles.${profile}.name = profile;
+
+ stylix.targets.librewolf = {
+ firefoxGnomeTheme.enable = true;
+ profileNames = [profile];
+ };
+ }
+ )
+
+ {programs.librewolf.enable = true;}
+ ]
+ );
}
Link: #702 Tested-by: Daniel Thwaites <[email protected]> Approved-by: Daniel Thwaites <[email protected]> Reviewed-by: NAHO <[email protected]> Tested-by: NAHO <[email protected]> (cherry picked from commit 1d7b70e)
Link: #702 Tested-by: Daniel Thwaites <[email protected]> Approved-by: Daniel Thwaites <[email protected]> Reviewed-by: NAHO <[email protected]> Tested-by: NAHO <[email protected]> (cherry picked from commit 1d7b70e)
Oh snap, I forgot to add that! Should that be a separate testbed, since the option is not enabled by default?
Sorry for having sounded impatient. I was trying to make sure I didn't miss anything myself that would have delayed the process. |
Ideally, yes. |
Yeah, we should have one testbed for regular Firefox and one with the GNOME theme enabled. Unfortunately we'll need to adapt the testbed system first because it currently only allows one |
This adds the
firefoxGnomeTheme.enable
option which installs the Firefox GNOME theme with the Stylix palette on Firefox derivatives. Note that the newmodules/firefox/userChrome.mustache
is mostly a syntactically modified version ofmodules/gtk/gtk.mustache
.Preview the Firefox GNOME theme on LibreWolf with other slight modifications.
Note the similarity to the GNOME Web browser.