nix-infra/common/options.nix

20 lines
482 B
Nix
Raw Normal View History

{ lib, config, ... }: {
options = {
environment.graphical.theme = with lib; {
name = mkOption { type = types.str; };
light = mkOption {
default = false;
type = types.bool;
};
};
};
config = let
theme =
config.environment.graphical.colorschemes."${config.environment.graphical.theme.name}";
in {
environment.graphical.theme.light = builtins.elem "--light" theme.params
|| builtins.elem "-l" theme.params;
};
}