stylix: move testbed isEnabled to its own file
This commit is contained in:
parent
aaa0517d20
commit
f996bf8870
2 changed files with 26 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
25
stylix/testbed/is-enabled.nix
Normal file
25
stylix/testbed/is-enabled.nix
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue