Skip to content

firefox: support Glide derivative#2240

Open
zzzealed wants to merge 7 commits into
nix-community:masterfrom
zzzealed:add-glide-browser
Open

firefox: support Glide derivative#2240
zzzealed wants to merge 7 commits into
nix-community:masterfrom
zzzealed:add-glide-browser

Conversation

@zzzealed

@zzzealed zzzealed commented Mar 16, 2026

Copy link
Copy Markdown

Hello and thanks for your work on Stylix :)

I added Glide to the Firefox (and derivatives)-module, since Glide now has a Home Manager-module made with mkFirefoxModule. This means it should be compatible with the same options as the other derivatives.

I tested this myself and can confirm that the options looks to be working.

I hope I added everything correctly, as this is my first time making a contribution. Please do not hesitate to leave feedback or request changes.


@stylix-automation stylix-automation Bot added topic: home-manager Home Manager target topic: modules /modules/ subsystem labels Mar 16, 2026

@trueNAHO trueNAHO left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is currently failing because lib.maintainers.zzzealed and glide-browser are undefined. If these are recent upstream additions, this PR requires #2180 to be merged first.

  • Each commit in this PR is suitable for backport to the current stable branch

Are the necessary upstream patches available in our release-25.11 branch?

I hope I added everything correctly, as this is my first time making a contribution.

LGTM, except for one nitpick. I will also test this PR in a testbed once CI is working again.

Comment thread modules/firefox/meta.nix Outdated
@trueNAHO trueNAHO changed the title Add glide browser firefox: support Glide derivative Mar 17, 2026
@zzzealed

Copy link
Copy Markdown
Author

CI is currently failing because lib.maintainers.zzzealed and glide-browser are undefined. If these are recent upstream additions, this PR requires #2180 to be merged first.

Yeah so I removed myself as maintainer since I'm not in maintainer-list.nix. I hope this is fine.
For glide-browser being undefined, I think this happens because Glide isn't actually merged to nixpkgs yet. I use their flake's Home Manager module.
I don't know if Stylix has any policy on non-nixpkgs (yet) projects, like Glide. Please let me know if that's the case.

Are the necessary upstream patches available in our release-25.11 branch?

Yes it look's to me like release-25.11 has the sufficient patches.

@0xda157

0xda157 commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

CI failures seem to be unrelated to this PR's changes, could you force push to trigger a re-run? also ideally a testbed would be added before merging.

@zzzealed zzzealed force-pushed the add-glide-browser branch from b8adbe5 to bd2fac8 Compare April 12, 2026 19:56
@zzzealed

zzzealed commented Apr 14, 2026

Copy link
Copy Markdown
Author

also ideally a testbed would be added before merging.

Sure I can do that. As I said Glide isn't in Nixpkgs but I could just add Glide's input in flake.nix and copy the modules/firefox/testbeds/firefox.nix. Then lastly import and modify modules/firefox/testbeds/firefox-color.nix and modules/firefox/testbeds/firefox-gnome-theme.nix.

Does this approach make sense?

@trueNAHO trueNAHO left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed myself as maintainer since I'm not in maintainer-list.nix. I hope this is fine.

It would be highly appreciated to add yourself as a maintainer so you are notified about potential Glide issues. The process is already documented:

stylix/doc/src/modules.md

Lines 225 to 251 in 8ed48a4

### Maintainers
New modules must have at least one maintainer.
If you are not already listed in the Nixpkgs `/maintainers/maintainer-list.nix`
maintainer list, add yourself to `/stylix/maintainers.nix`.
Add yourself as a maintainer in one of the following ways, depending on the
number of maintainers:
- ```nix
{ lib, ... }:
{
maintainers = [ lib.maintainers.danth ];
}
```
- ```nix
{ lib, ... }:
{
maintainers = with lib.maintainers; [
danth
da157
noahbiewesch
];
}
```

Otherwise, inspect commits touching /stylix/maintainers.nix for further inspiration.

I don't know if Stylix has any policy on non-nixpkgs (yet) projects, like Glide. Please let me know if that's the case.

[...]

Glide isn't in Nixpkgs but I could just add Glide's input in flake.nix

Yes, this is how we handle external module integration, except that we do not publicly expose these test inputs by adding them to the internal /flake/dev/flake.nix. See commit aa0272b ("dank-material-shell: init (#2177)") as an example.

and copy the modules/firefox/testbeds/firefox.nix. Then lastly import and modify modules/firefox/testbeds/firefox-color.nix and modules/firefox/testbeds/firefox-gnome-theme.nix.

Yes, adding a testbed for this external module would be highly appreciated. I suppose adding a single /modules/firefox/testbeds/glide.nix testbed suffices.

Comment thread modules/firefox/meta.nix Outdated
@zzzealed zzzealed force-pushed the add-glide-browser branch 2 times, most recently from 675e0f7 to 63acab1 Compare June 7, 2026 04:16
@stylix-automation stylix-automation Bot added the topic: stylix /stylix/ subsystem label Jun 7, 2026
@zzzealed zzzealed force-pushed the add-glide-browser branch from 63acab1 to 7c15c5b Compare June 7, 2026 04:16
@zzzealed zzzealed force-pushed the add-glide-browser branch from 7c15c5b to ea4ac32 Compare June 7, 2026 04:32
@stylix-automation stylix-automation Bot added topic: testbed Testbed changes topic: flake /flake.nix, /flake.lock, and /flake/ subsystems labels Jun 7, 2026
@zzzealed

zzzealed commented Jun 7, 2026

Copy link
Copy Markdown
Author

Hello :)
I made the changes as suggested. Hopefully this is what you had in mind.

I also tried cleaning up the commits a bit.

Let me know if there are more changes needed.

Comment thread modules/firefox/testbeds/firefox-color.nix
Comment thread modules/firefox/testbeds/firefox-gnome-theme.nix
Comment thread flake/dev/flake.nix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try resolving the CI failures and verify the theme working inside the nix run .#testbed:glide:{dark,light} testbeds.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nix run .#testbed:glide-browser:light and nix run .#testbed:glide-browser:dark looks correct now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try resolving the CI failures

Maybe the following resolves the aarch64-linux failures:

diff --git a/modules/firefox/each-config.nix b/modules/firefox/each-config.nix
index 846eb20d..11fb227a 100644
--- a/modules/firefox/each-config.nix
+++ b/modules/firefox/each-config.nix
@@ -9,6 +9,7 @@
   lib,
   pkgs,
   config,
+  options,
   ...
 }:
 mkTarget {
@@ -26,7 +27,7 @@ mkTarget {
     firefoxGnomeTheme.enable = lib.mkEnableOption "[Firefox GNOME theme](https://github.com/rafaelmardojai/firefox-gnome-theme) on ${humanName}";
   };

-  config = [
+  config = lib.optionals (name == "glide-browser" -> options.programs ? ${name}) [
     (
       { cfg }:
       {

@zzzealed zzzealed force-pushed the add-glide-browser branch from 882d2e9 to e53dbc5 Compare June 13, 2026 08:23
Comment thread modules/firefox/meta.nix Outdated
Co-authored-by: Noah Biewesch <dev@noahbiewesch.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: flake /flake.nix, /flake.lock, and /flake/ subsystems topic: home-manager Home Manager target topic: modules /modules/ subsystem topic: stylix /stylix/ subsystem topic: testbed Testbed changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants