Add a 'stylix.enable' option to enable or disable all Stylix modules in
order to resolve issues similar to [2].
To align with the default 'lib.mkEnableOption' [1] behavior,
'stylix.enable' defaults to 'false'.
BREAKING CHANGE: Stylix is disabled by default. To enable it, use:
stylix.enable = true;
[1]: https://github.com/NixOS/nixpkgs/blob/23.11/lib/options.nix#L91-L105
[2]: https://github.com/danth/stylix/issues/216
Co-authored-by: Daniel Thwaites <danthwaites30@btinternet.com>
Co-authored-by: Jalil David Salamé Messina <jalil.salame@gmail.com>
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
33 lines
944 B
Nix
33 lines
944 B
Nix
{ config, lib, ... }:
|
|
|
|
{
|
|
options.stylix.targets.xresources.enable =
|
|
config.lib.stylix.mkEnableTarget "Xresources" true;
|
|
|
|
config = lib.mkIf (config.stylix.enable && config.stylix.targets.xresources.enable) {
|
|
xresources.properties = with config.lib.stylix.colors.withHashtag; with config.stylix.fonts; {
|
|
"*.faceName" = monospace.name;
|
|
"*.faceSize" = sizes.terminal;
|
|
"*.renderFont" = true;
|
|
"*foreground" = base05;
|
|
"*background" = base00;
|
|
"*cursorColor" = base05;
|
|
"*color0" = base00;
|
|
"*color1" = base08;
|
|
"*color2" = base0B;
|
|
"*color3" = base0A;
|
|
"*color4" = base0D;
|
|
"*color5" = base0E;
|
|
"*color6" = base0C;
|
|
"*color7" = base05;
|
|
"*color8" = base03;
|
|
"*color9" = base09;
|
|
"*color10" = base01;
|
|
"*color11" = base02;
|
|
"*color12" = base04;
|
|
"*color13" = base06;
|
|
"*color14" = base0F;
|
|
"*color15" = base07;
|
|
};
|
|
};
|
|
}
|