11.stylix/stylix/testbed/modules/enable.nix
Matt Sturgeon 7afee8f85b
stylix: move testbed modules to their own files
Introduce `user.toml` for storing shared user info.
2025-05-28 00:30:20 +01:00

28 lines
841 B
Nix

{ lib, config, ... }:
{
options.stylix.testbed.enable = lib.mkOption {
type = lib.types.bool;
default = true;
example = lib.literalExpression "lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.discord";
description = ''
Whether to enable this testbed.
The testbed will not be included as a flake output if set to false.
> [!CAUTION]
>
> This option can only access `lib` and `pkgs` inputs. Attempting to
> read other inputs, like `config` or `options`, will cause the
> testbed evaluation to fail.
>
> This is a performance-driven restriction, as noted in `isEnabled`.
'';
};
config.assertions = [
{
assertion = config.stylix.testbed.enable;
message = "Building a disabled testbed. This testbed should have been filtered out!";
}
];
}