Skip to content

Conversation

trueNAHO
Copy link
Member

@trueNAHO trueNAHO commented Aug 19, 2025

commit 5a75d352c1dc8f4a3fa4b018d59589fbecb0533c
Author: NAHO <[email protected]>
Date:   2025-08-19 22:21:23 +0200

    flake: remove tinted-schemes input in favor of pkgs.base16-scheme

 flake.lock                           | 17 -----------------
 flake.nix                            |  5 -----
 flake/dev/flake.nix                  |  1 -
 stylix/testbed/themes/cursorless.nix |  5 ++---
 stylix/testbed/themes/dark.nix       |  5 ++---
 stylix/testbed/themes/imageless.nix  |  7 ++-----
 stylix/testbed/themes/light.nix      |  5 ++---
 7 files changed, 8 insertions(+), 37 deletions(-)

commit e698150f68a2e443c9c01133ee072abaab3de47b
Author: NAHO <[email protected]>
Date:   2025-08-19 23:36:32 +0200

    stylix/home-manager-integration: do not guard on stylix.enable

    Do not guard on stylix.enable because the original issue from commit
    73b7d0f30039 ("stylix: guard home-manager-integration config (#1494)")
    seems to have resolved itself in the meantime.

    This allows testbeds to declare Stylix target options when Stylix is
    disabled.

    Reverts: 73b7d0f30039 ("stylix: guard home-manager-integration config (#1494)")

 stylix/home-manager-integration.nix | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

commit 3c286df0a2b13d3e4c707e51ef5083f7ba124c35
Author: NAHO <[email protected]>
Date:   2025-08-19 22:21:23 +0200

    stylix/testbeds/themes: overhaul testbed themes for broader coverage

 README.md                                          |   2 +-
 doc/src/testbeds.md                                |  20 ++--
 stylix/testbed/images.nix                          |  30 ------
 stylix/testbed/themes/dark.nix                     |  17 ----
 .../testbed/themes/{cursorless.nix => default.nix} |   8 +-
 stylix/testbed/themes/disabled.nix                 |   2 +
 stylix/testbed/themes/empty.nix                    |  38 +++++++
 stylix/testbed/themes/full-dark.nix                | 113 +++++++++++++++++++++
 stylix/testbed/themes/imageless.nix                |  13 ---
 stylix/testbed/themes/light.nix                    |  17 ----
 stylix/testbed/themes/partial-light.nix            |  41 ++++++++
 stylix/testbed/themes/schemeless.nix               |  16 ---
 12 files changed, 207 insertions(+), 110 deletions(-)

Submission Checklist

  • I certify that I have the right to submit this contribution under the MIT license

  • Commit messages adhere to Stylix commit conventions

  • Theming changes adhere to the Stylix style guide

  • Changes have been tested locally

  • Changes have been tested in testbeds

    • To test the Kitty module with the new testbed themes, run:

      nix build --no-link \
        github:trueNAHO/stylix/stylix-testbed-themes-overhaul-testbed-themes-for-broader-coverage#testbed:kitty:{default,disabled,empty,full-dark,partial-light}
      
      nix run nixpkgs#parallel -- \
        nix run '{}' ::: \
        github:trueNAHO/stylix/stylix-testbed-themes-overhaul-testbed-themes-for-broader-coverage#testbed:kitty:{default,disabled,empty,full-dark,partial-light}
  • Each commit in this PR is suitable for backport to the current stable branch

Notify Maintainers

@awwpotato @danth

@trueNAHO trueNAHO requested review from danth and awwpotato August 19, 2025 20:32
@stylix-automation stylix-automation bot added topic: documentation Documentation additions or improvements topic: dependencies Dependency updates topic: testbed Testbed changes topic: flake /flake.nix, /flake.lock, and /flake/ subsystems topic: stylix /stylix/ subsystem labels Aug 19, 2025
Comment on lines +16 to +21
icons = {
dark = "Adwaita";
enable = true;
light = "Adwaita";
package = pkgs.adwaita-icon-theme;
};
Copy link
Member Author

Choose a reason for hiding this comment

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

Could someone verify whether this works?

Comment on lines +13 to +17
icons = {
dark = "Adwaita";
enable = true;
package = pkgs.adwaita-icon-theme;
};
Copy link
Member Author

Choose a reason for hiding this comment

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

Could someone verify whether this works?

@trueNAHO trueNAHO added the backport: release-25.05 Changes to release-25.05 stable branch label Aug 19, 2025
@trueNAHO trueNAHO marked this pull request as draft August 19, 2025 21:39
};
};

config = lib.mkIf config.stylix.enable (
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we reverting 73b7d0f? this pretty clear goes against the spirit of 7682713

Copy link
Member Author

@trueNAHO trueNAHO Aug 20, 2025

Choose a reason for hiding this comment

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

why are we reverting 73b7d0f? this pretty clear goes against the spirit of 7682713

The new disabled testcase is failing. The following commit fixes that:

stylix/home-manager-integration: unconditionally enable

Unconditionally enable the Home Manager integration to avoid

    error: The option `virtualisation.vmVariant.home-manager.users.guest.stylix' does not exist. Definition values:

errors inside 'stylix.enable = false;' testbeds containing the following
declaration:

    home-manager.sharedModules = lib.singleton {
      stylix.targets.${target}.${option} = value;
    };

Ideally, the Home Manager integration merely provides the options, and
the actual modules should do the guarding.

-- fcde0a7 ("stylix/home-manager-integration: unconditionally enable")

When I implemented this fix and quickly glanced over the discussion from commit 73b7d0f, it seems the new test cases cover all problems that were originally mentioned.

I will test each of these cases locally in my standalone Home Manager setup to see if this also works in end-user setups. This is the main reason this PR is currently in draft mode. Also, the commit message from fcde0a7 ("stylix/home-manager-integration: unconditionally enable") is currently just for debugging purposes, and will be overhauled if its diff is good.

Copy link
Member Author

@trueNAHO trueNAHO Aug 20, 2025

Choose a reason for hiding this comment

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

I will test each of these cases locally in my standalone Home Manager setup to see if this also works in end-user setups.

AFAICT, this does not affect Stylix integration with standalone Home Manager. The NixOS and Home Manager integration is covered by the new test cases, while the standalone NixOS integration seems untested.

This is the main reason this PR is currently in draft mode.

I am optimistically marking this PR as ready for review again.

quickly glanced over the discussion from commit 73b7d0f, it seems the new test cases cover all problems that were originally mentioned.

It seems whatever was the issue in that discussion, seems to have resolved itself in the meantime, as indicated by the new theme coverage:

Theme image base16Scheme
disabled false false
default false true
partial-light true false
full-dark true true

Comment on lines +17 to +19
dark = "Adwaita";
enable = true;
light = "Adwaita";
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we using the light icons for dark?

Suggested change
dark = "Adwaita";
enable = true;
light = "Adwaita";
dark = "Adwaita Dark";
enable = true;
light = "Adwaita";

Copy link
Member Author

Choose a reason for hiding this comment

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

why are we using the light icons for dark?

As implied by the theme name and its file header, full-dark declares all available Stylix options to reasonable non-default values, while partial-light intentionally does not declare all available Stylix options in order to test modularity. The dark and light polarity tests are merged with the "full" and "partial" test cases to reduce the total number of themes. In other words, full-dark declares stylix.icons.light despite being stylix.polarity = "dark"; to test whether this redundant declared value causes any problems.

Suggested change
dark = "Adwaita";
enable = true;
light = "Adwaita";
dark = "Adwaita Dark";
enable = true;
light = "Adwaita";

Does "Adwaita Dark" work? I see no such reference:

$ nix build --no-link --print-out-paths nixpkgs#adwaita-icon-theme | xargs rg --ignore-case 'Adwaita|Dark|Light'
/nix/store/phcncb0xzj0y2bcx7zd171b32cfqblz2-adwaita-icon-theme-47.0/share/icons/Adwaita/index.theme
2:Name=Adwaita

/nix/store/phcncb0xzj0y2bcx7zd171b32cfqblz2-adwaita-icon-theme-47.0/share/pkgconfig/adwaita-icon-theme.pc
2:Name: adwaita-icon-theme

Do not guard on stylix.enable because the original issue from commit
73b7d0f ("stylix: guard home-manager-integration config (nix-community#1494)")
seems to have resolved itself in the meantime.

This allows testbeds to declare Stylix target options when Stylix is
disabled.

Reverts: 73b7d0f ("stylix: guard home-manager-integration config (nix-community#1494)")
@trueNAHO trueNAHO force-pushed the stylix-testbed-themes-overhaul-testbed-themes-for-broader-coverage branch from fcde0a7 to 3c286df Compare August 21, 2025 00:10
@trueNAHO trueNAHO marked this pull request as ready for review August 21, 2025 00:13
@trueNAHO trueNAHO requested a review from awwpotato August 26, 2025 18:14
@stylix-automation stylix-automation bot added the status: merge conflict Merge conflict label Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: release-25.05 Changes to release-25.05 stable branch status: merge conflict Merge conflict topic: dependencies Dependency updates topic: documentation Documentation additions or improvements topic: flake /flake.nix, /flake.lock, and /flake/ subsystems topic: stylix /stylix/ subsystem topic: testbed Testbed changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants