treewide: add application testbeds (#612)

Extend testbeds with individual GUI applications beyond DEs, offering the
following benefits:

- Preview PRs without changing your real configuration by running:

    nix run github:«owner»/«repository»/«branch»#testbed-«application»-«polarity»'

- Unlike local installations, testbeds reset their filesystem between rebuilds,
  ensuring each test simulates a fresh installation to identify cases requiring
  manual steps for module effectiveness.

- Enhances CI to test that configurations evaluate correctly when a module is
  enabled. The extent to which this confirms that the configuration actually
  works can vary depending on the upstream implementation of the module.

The application testbeds are currently based on GNOME but could be replaced with
a lightweight compositor like Cage [1] in the future. GNOME was chosen for the
time being due to preconfigured services, such as a secret service [2], which
some applications require.

[1]: https://github.com/cage-kiosk/cage?tab=readme-ov-file#cage-a-wayland-kiosk
[2]: https://specifications.freedesktop.org/secret-service-spec/latest
This commit is contained in:
Daniel Thwaites 2024-12-29 22:51:00 +00:00 committed by GitHub
commit 71eea3f02a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 262 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{ pkgs, ... }:
let package = pkgs.firefox;
in {
stylix.testbed.application = {
enable = true;
name = "firefox";
inherit package;
};
home-manager.sharedModules = [{
programs.firefox = {
enable = true;
inherit package;
profiles.stylix.isDefault = true;
};
stylix.targets.firefox.profileNames = [ "stylix" ];
}];
}