stylix: move testbed isEnabled to its own file

This commit is contained in:
Matt Sturgeon 2025-05-27 14:42:29 +01:00
parent aaa0517d20
commit f996bf8870
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 26 additions and 19 deletions

View file

@ -6,25 +6,7 @@
}:
let
# Creates a minimal configuration to extract the `stylix.testbed.enable`
# option value.
#
# This is for performance reasons. Primarily, to avoid fully evaluating
# testbed system configurations to determine flake outputs.
# E.g., when running `nix flake show`.
isEnabled =
module:
let
minimal = lib.evalModules {
modules = [
module
./modules/enable.nix
{ _module.check = false; }
{ _module.args = { inherit pkgs; }; }
];
};
in
minimal.config.stylix.testbed.enable;
isEnabled = pkgs.callPackage ./is-enabled.nix { };
autoload =
let

View file

@ -0,0 +1,25 @@
{
lib,
pkgs,
}:
/**
Creates a minimal configuration to extract the `stylix.testbed.enable` option
value.
This is for performance reasons. Primarily, to avoid fully evaluating testbed
system configurations to determine flake outputs.
E.g., when running `nix flake show`.
*/
module:
let
minimal = lib.evalModules {
modules = [
module
./modules/enable.nix
{ _module.check = false; }
{ _module.args = { inherit pkgs; }; }
];
};
in
minimal.config.stylix.testbed.enable