Skip to content

Conversation

trueNAHO
Copy link
Member

@trueNAHO trueNAHO commented Jul 9, 2025

commit 5c795b6a3b8c582fe19cda99985582130f6af44e
Author: NAHO <[email protected]>
Date:   2025-07-30 12:10:25 +0200

    sxiv/testbed: remove trailing Bash semicolon

    Fixes: 8b898ca041a3 ("sxiv: avoid downloading custom file in testbed (#1641)")

 modules/sxiv/testbeds/sxiv.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit cd3a0f795be9a93d12aa4cbdffdf2f4980bb55ea
Author: NAHO <[email protected]>
Date:   2025-07-09 18:38:21 +0200

    stylix/testbed/modules/application: add examples to boolean options

 stylix/testbed/modules/application.nix | 2 ++
 1 file changed, 2 insertions(+)

commit f88ad31a6b7bbd80354c3accde689f6309abfb2a
Author: NAHO <[email protected]>
Date:   2025-07-09 18:38:59 +0200

    stylix/testbed/modules/application: match mkEnableOption's description

 stylix/testbed/modules/application.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 41d66fd0e7eeb65c4bf0f70b03f9020dd7fbfb66
Author: NAHO <[email protected]>
Date:   2025-08-26 20:57:25 +0200

    doc/src/testbeds: mention stylix.testbed.ui.command.useTerminal default

    Co-authored-by: awwpotato <[email protected]>

 doc/src/testbeds.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 45708cc1139ca0d67a5283d35cc6f7a9a1823301
Author: NAHO <[email protected]>
Date:   2025-07-09 18:39:58 +0200

    stylix/testbed/modules/application: wrap documentation to 80 characters

 stylix/testbed/modules/application.nix | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

commit b487408f02bcd010bb7e6b16952f6847b05ca186
Author: NAHO <[email protected]>
Date:   2025-07-29 16:04:48 +0200

    stylix/testbed/modules/application: allow re-running test code

    Allow re-running test code via deskop items and stylix-testbed-${name}
    CLIs.

 stylix/testbed/modules/application.nix | 94 ++++++++++++++++++++++------------
 1 file changed, 60 insertions(+), 34 deletions(-)

commit bf771ab8d53e5889e2022dacc55e7651e003d040
Author: NAHO <[email protected]>
Date:   2025-07-29 16:23:57 +0200

    stylix/testbed/modules/application: conveniently install dependencies

 stylix/testbed/modules/application.nix | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

commit 4559b55b5e3f4f8dbf8c3bb271edc835777d99fb
Author: NAHO <[email protected]>
Date:   2025-07-30 11:49:44 +0200

    treewide: simplify and standardize testbeds

    Simplify and standardize testbeds by replacing
    config.stylix.testbed.ui.application declarations with
    config.stylix.testbed.ui.command, and replacing

        stylix.testbed.ui.command = {
          packages = [ package ];
          text = package.meta.mainProgram;
        };

    with

        stylix.testbed.ui.command.packages = [ package ];

    by trivially deducing config.stylix.testbed.ui.command.text from
    config.stylix.testbed.ui.command.packages.

    Leverage the default programs."<PACKAGE>".package value to simplify

        let
          package = pkgs."<PACKAGE>";
        in
        {
          stylix.testbed.ui.command.packages = [ package ];

          home-manager.sharedModules = lib.singleton {
            programs."<PACKAGE>" = {
              inherit package;
              enable = true;
            };
          };
        }

    to

        {
          stylix.testbed.ui.command.text = "<PACKAGE_META_MAIN_PROGRAM>";

          home-manager.sharedModules = lib.singleton {
            programs."<PACKAGE>".enable = true;
          };
        }

    Minor stylistic changes are made to standardize testbed declarations.

 doc/src/testbeds.md                                |  9 ++--
 modules/alacritty/testbeds/alacritty.nix           | 15 ++----
 modules/ashell/testbeds/ashell.nix                 |  2 +-
 modules/bat/testbeds/bat.nix                       | 15 +++---
 modules/blender/testbeds/blender.nix               | 10 +---
 modules/bspwm/testbeds/bspwm.nix                   |  7 +--
 modules/btop/testbeds/btop.nix                     |  4 +-
 modules/cava/testbeds/cava-rainbow.nix             |  6 +--
 modules/cava/testbeds/cava.nix                     |  6 +--
 modules/cavalier/testbeds/cavalier.nix             | 13 +----
 modules/chromium/testbeds/chromium.nix             | 14 ++----
 modules/discord/testbeds/vencord.nix               | 26 +++-------
 modules/discord/testbeds/vesktop.nix               | 15 ++----
 modules/emacs/testbeds/emacs.nix                   |  7 +--
 modules/eog/testbeds/eog.nix                       |  4 +-
 modules/firefox/testbeds/firefox-gnome-theme.nix   | 34 ++++++-------
 modules/firefox/testbeds/firefox.nix               | 30 +++++-------
 modules/foliate/testbeds/foliate.nix               | 15 ++----
 modules/foot/testbeds/foot.nix                     | 15 ++----
 modules/fuzzel/testbeds/fuzzel.nix                 |  2 +-
 modules/fzf/testbeds/fzf.nix                       |  4 +-
 modules/gedit/testbeds/gedit.nix                   |  6 ++-
 modules/ghostty/testbeds/ghostty.nix               | 15 ++----
 modules/glance/testbeds/glance-hm.nix              | 19 +++-----
 modules/glance/testbeds/glance-nixos.nix           | 19 +++-----
 .../testbeds/gnome-text-editor.nix                 |  6 ++-
 modules/halloy/testbeds/halloy.nix                 | 22 +++------
 modules/hyprland/testbeds/hyprland.nix             |  7 +--
 modules/kde/testbeds/kde.nix                       | 13 +++--
 modules/kitty/testbeds/kitty.nix                   | 15 ++----
 modules/lazygit/testbeds/lazygit.nix               |  7 +--
 modules/micro/testbeds/micro.nix                   |  4 +-
 modules/mpv/testbeds/mpv-modernz.nix               |  9 +---
 modules/mpv/testbeds/mpv-uosc.nix                  |  9 +---
 modules/mpv/testbeds/mpv.nix                       | 15 ++----
 modules/ncspot/testbeds/ncspot.nix                 |  5 +-
 modules/neovim/testbeds/neovide.nix                |  7 +--
 modules/neovim/testbeds/vim.nix                    |  4 +-
 modules/qutebrowser/testbeds/qutebrowser.nix       | 15 ++----
 modules/rio/testbeds/rio.nix                       | 15 ++----
 modules/spicetify/testbeds/spicetify.nix           | 22 ++-------
 modules/starship/testbeds/starship.nix             | 11 ++---
 modules/sxiv/testbeds/sxiv.nix                     | 24 ++++-----
 modules/tmux/testbeds/tmux.nix                     |  5 +-
 modules/waybar/testbeds/waybar.nix                 |  5 +-
 modules/wayprompt/testbeds/wayprompt.nix           |  7 +--
 modules/wezterm/testbeds/wezterm.nix               | 15 ++----
 modules/wofi/testbeds/wofi.nix                     | 13 ++---
 modules/yazi/testbeds/yazi.nix                     | 19 ++------
 modules/zathura/testbeds/zathura.nix               | 15 ++----
 modules/zed/testbeds/zed.nix                       |  6 +--
 modules/zen-browser/testbeds/zen-browser.nix       |  2 +
 stylix/testbed/modules/application.nix             | 57 ++++++++--------------
 53 files changed, 214 insertions(+), 452 deletions(-)

commit 92ee46f4c602751df3eada1b0c667b2853f8c204
Author: NAHO <[email protected]>
Date:   2025-07-30 12:39:19 +0200

    treewide: rename stylix.testbed.ui.command.{useTerminal => terminal}

    Simplify the testbed interface by renaming
    stylix.testbed.ui.command.useTerminal to
    stylix.testbed.ui.command.terminal.

 doc/src/testbeds.md                    |  4 ++--
 modules/bat/testbeds/bat.nix           |  2 +-
 modules/btop/testbeds/btop.nix         |  2 +-
 modules/cava/testbeds/cava-rainbow.nix |  2 +-
 modules/cava/testbeds/cava.nix         |  2 +-
 modules/fish/testbeds/fish-hm.nix      |  2 +-
 modules/fish/testbeds/fish-nixos.nix   |  2 +-
 modules/fzf/testbeds/fzf.nix           |  2 +-
 modules/helix/testbeds/helix.nix       |  2 +-
 modules/lazygit/testbeds/lazygit.nix   |  2 +-
 modules/micro/testbeds/micro.nix       |  2 +-
 modules/ncspot/testbeds/ncspot.nix     |  2 +-
 modules/neovim/testbeds/neovim.nix     |  2 +-
 modules/neovim/testbeds/nixvim.nix     |  2 +-
 modules/neovim/testbeds/nvf.nix        |  2 +-
 modules/neovim/testbeds/vim.nix        |  2 +-
 modules/nushell/testbeds/nushell.nix   |  2 +-
 modules/starship/testbeds/starship.nix |  2 +-
 modules/tmux/testbeds/tmux.nix         |  2 +-
 modules/zellij/testbeds/zellij.nix     |  2 +-
 stylix/testbed/modules/application.nix | 19 +++++++++----------
 21 files changed, 30 insertions(+), 31 deletions(-)

Changelog

v8: 92ee46f

v7: 0042265

v6: a5a8c41

v5: b9e3c74

  • treewide: simplify and standardize testbeds
    • Remove stylix.testbed.ui.command.packages = [ pkgs.kitty ]; in /modules/kde/testbeds/plasma5.nix to avoid enabling GNOME.

v4: 2b4754f

  • treewide: simplify and standardize testbeds
    • Use local packages variable in throw.

v3: 303cef8

  • treewide: simplify and standardize testbeds
    • Add missing throw call.
    • Remove multiline = false; because we are throwing and no longer curating assertion errors.

v2: 1a8885e

  • treewide: simplify and standardize testbeds
    • Fix null access by inlining assertion and using local variables.

v1: 0a8661c

  • Rebase on top of commit 57d036d ("doc: commit_convention: overhaul and formalize unspoken rules (doc: commit_convention: overhaul and formalize unspoken rules #1717)").
  • Remove commit treewide: optionally apply lib.getExe to stylix.testbed.ui.command.gnome-text-editor in favor of the new commit treewide: simplify and standardize testbeds.
  • Add the following commits:
    • sxiv/testbed: remove trailing Bash semicolon
    • stylix/testbed/modules/application: allow re-running test code
    • stylix/testbed/modules/application: conveniently install dependencies
    • treewide: rename stylix.testbed.ui.command.{useTerminal => terminal}

v0: 1e3df8b


Notify Maintainers

@stylix-automation stylix-automation bot added the topic: testbed Testbed changes label Jul 9, 2025
@trueNAHO trueNAHO marked this pull request as draft July 12, 2025 16:16
@trueNAHO trueNAHO force-pushed the treewide-optionally-apply-lib-get-exe-to-stylix-testbed-ui-command-text branch from 1e3df8b to 0a8661c Compare July 30, 2025 10:49
@stylix-automation stylix-automation bot added topic: documentation Documentation additions or improvements topic: modules /modules/ subsystem topic: stylix /stylix/ subsystem labels Jul 30, 2025
@trueNAHO trueNAHO mentioned this pull request Jul 30, 2025
6 tasks
@trueNAHO trueNAHO marked this pull request as ready for review July 30, 2025 10:58
@trueNAHO trueNAHO changed the title treewide: optionally apply lib.getExe to stylix.testbed.ui.command.text treewide: allow re-running test code and simplify testbeds Jul 30, 2025
@trueNAHO trueNAHO force-pushed the treewide-optionally-apply-lib-get-exe-to-stylix-testbed-ui-command-text branch 6 times, most recently from b9e3c74 to a5a8c41 Compare July 31, 2025 14:14
@trueNAHO trueNAHO force-pushed the treewide-optionally-apply-lib-get-exe-to-stylix-testbed-ui-command-text branch from a5a8c41 to 0042265 Compare August 4, 2025 17:58
@trueNAHO trueNAHO requested a review from awwpotato August 13, 2025 17:42
@trueNAHO
Copy link
Member Author

Important

This patchset should be git rebase master before being merged to avoid uncaught internal breaking changes.

Copy link
Contributor

@awwpotato awwpotato left a comment

Choose a reason for hiding this comment

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

generally lgtm, just some small things

name = name';
};

name' = "stylix-testbed" + lib.optionalString (name != "") "-${name}";
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer putting name' at the top of the let in because it's used by other things in the let in block

Copy link
Member Author

@trueNAHO trueNAHO Aug 26, 2025

Choose a reason for hiding this comment

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

I would prefer putting name' at the top of the let in because it's used by other things in the let in block

The let application name' in order was already previously present.

Personally, I prefer uniformly sorting non-special constructs lexicographically to avoid ambiguous cases, while keeping the set of special constructs as small as possible.

For example, keeping the

      ╭-------a-------╮
      |               |
 ╭---aa---╮      ╭---ab---╮
 |        |      |        |
aaa      aab    aba      abb

dependency tree declarations in DFS order (a aa aaa aab ab aba abb) without tooling (which is practically non-existent) is a lot more effort than simply lexicographically sorting them. Note that the recursive DFS order falls apart when dealing with general DAGs, as in aaa also depends on aba in the previous graph. Since most modern languages, including Nix, no longer require declaration before use, identifiers can be arbitrarily ordered within the same scope, in which case I prefer lexicographical sorting.

Special Nix constructs include imports options config declarations and conventional fetchFrom* { owner repo rev hash } argument sorting.

I am fine with moving name' to the top, but we can also just leave it as-is.

@stylix-automation stylix-automation bot added the status: merge conflict Merge conflict label Aug 24, 2025
trueNAHO and others added 8 commits August 26, 2025 23:16
Fixes: 8b898ca ("sxiv: avoid downloading custom file in testbed (nix-community#1641)")
Allow re-running test code via deskop items and stylix-testbed-${name}
CLIs.
Simplify and standardize testbeds by replacing
config.stylix.testbed.ui.application declarations with
config.stylix.testbed.ui.command, and replacing

    stylix.testbed.ui.command = {
      packages = [ package ];
      text = package.meta.mainProgram;
    };

with

    stylix.testbed.ui.command.packages = [ package ];

by trivially deducing config.stylix.testbed.ui.command.text from
config.stylix.testbed.ui.command.packages.

Leverage the default programs."<PACKAGE>".package value to simplify

    let
      package = pkgs."<PACKAGE>";
    in
    {
      stylix.testbed.ui.command.packages = [ package ];

      home-manager.sharedModules = lib.singleton {
        programs."<PACKAGE>" = {
          inherit package;
          enable = true;
        };
      };
    }

to

    {
      stylix.testbed.ui.command.text = "<PACKAGE_META_MAIN_PROGRAM>";

      home-manager.sharedModules = lib.singleton {
        programs."<PACKAGE>".enable = true;
      };
    }

Minor stylistic changes are made to standardize testbed declarations.
Simplify the testbed interface by renaming
stylix.testbed.ui.command.useTerminal to
stylix.testbed.ui.command.terminal.
@trueNAHO trueNAHO force-pushed the treewide-optionally-apply-lib-get-exe-to-stylix-testbed-ui-command-text branch from 0042265 to 92ee46f Compare August 26, 2025 21:17
@trueNAHO
Copy link
Member Author

trueNAHO commented Aug 27, 2025

The x86_64-linux Zathura testbeds keep failing because of https://nix-community.cachix.org:

warning: error: unable to download 'https://nix-community.cachix.org/nar/da62dc0e100a5907266d74df5a9482b5669c3e5456a1a3d087dfccc2d5107160.nar.zst': HTTP error 500

       response body:

       Cannot serve NAR; retrying in 317 ms
warning: error: unable to download 'https://nix-community.cachix.org/nar/da62dc0e100a5907266d74df5a9482b5669c3e5456a1a3d087dfccc2d5107160.nar.zst': HTTP error 500

       response body:

       Cannot serve NAR; retrying in 696 ms
warning: error: unable to download 'https://nix-community.cachix.org/nar/da62dc0e100a5907266d74df5a9482b5669c3e5456a1a3d087dfccc2d5107160.nar.zst': HTTP error 500

       response body:

       Cannot serve NAR; retrying in 1149 ms
warning: error: unable to download 'https://nix-community.cachix.org/nar/da62dc0e100a5907266d74df5a9482b5669c3e5456a1a3d087dfccc2d5107160.nar.zst': HTTP error 500

       response body:

       Cannot serve NAR; retrying in 2561 ms
error: unable to download 'https://nix-community.cachix.org/nar/da62dc0e100a5907266d74df5a9482b5669c3e5456a1a3d087dfccc2d5107160.nar.zst': HTTP error 500

       response body:

       Cannot serve NAR
error: some substitutes for the outputs of derivation '/nix/store/3lbvbpy2ssnl6lqf75azd44bjdwk4mzr-unit-home-manager-guest.service.drv' failed (usually happens due to networking issues); try '--fallback' to build derivation from source
error: Cannot build '/nix/store/3wihmnnzskqz66zcrvq3x12jsn331z44-system-units.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/5v8njjnbdlbz3pk5w1lpv8lzxg684mv0-system-units
error: Cannot build '/nix/store/a2i53hywsh4xmnnr7lzmy3rnkh498rxz-etc.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/x2vir5n7z0ggpc0yqc20g7kcn7cb6fr1-etc
error: Cannot build '/nix/store/s13q6f84awyz43wl776b0f7xml04p7yj-nixos-system-testbed-zathura-cursorless-25.11.20250706.1fd8bad.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/bm1k1k4zmmcbkz4azwa4kzf2933nz62l-nixos-system-testbed-zathura-cursorless-25.11.20250706.1fd8bad
error: Cannot build '/nix/store/3f47lxyz1bc7676lsq8034rwa686hd53-closure-info.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/l7915d3mbpxyv5lw78h3rsknzn1h94jz-closure-info
error: Cannot build '/nix/store/0va3ql2njy4kahjf9cyzw04mhc5xyrgg-run-nixos-vm.drv'.
       Reason: 2 dependencies failed.
       Output paths:
         /nix/store/vlpsw7jrrjy0i61fnbas1spknmhx1g8q-run-nixos-vm
error: Cannot build '/nix/store/af3hrb4aqqirmk0mqbz94wnwp6s2zycn-nixos-vm.drv'.
       Reason: 2 dependencies failed.
       Output paths:
         /nix/store/dmk19zdm33iqnhixk0hqiw11hzhzqp58-nixos-vm
error: Cannot build '/nix/store/fxvxjv1m47qyir8j4b0x1mmpqml4sx24-testbed-zathura-cursorless.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/hhxzfcvpdb6yz5cm7jlrbddnr6pa5iy6-testbed-zathura-cursorless
WARNING:nix_fast_build:build testbed:zathura:cursorless exited with 1
ERROR:nix_fast_build:BUILD: 322 successes, 3 failures
ERROR:nix_fast_build:Failed attributes: .#checks.x86_64-linux.testbed:zathura:dark .#checks.x86_64-linux.testbed:zathura:imageless .#checks.x86_64-linux.testbed:zathura:cursorless

-- https://github.com/nix-community/stylix/actions/runs/17250732748/job/49003252327

Are we rate limiting the cache because all of the testbeds in this PR are new? Note that the aarch64-linux job succeeded on the second CI attempt.

Running just

nix build .#checks.x86_64-linux.testbed:zathura:{dark,imageless,cursorless}

locally also causes the same errors...

For reference, CI was still passing on v7.

CC: @danth

@stylix-automation stylix-automation bot removed the status: merge conflict Merge conflict label Sep 2, 2025
@stylix-automation stylix-automation bot added the status: merge conflict Merge conflict label Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: merge conflict Merge conflict topic: documentation Documentation additions or improvements 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.

2 participants