develop #16
1 changed files with 8 additions and 2 deletions
|
|
@ -51,11 +51,13 @@ in
|
|||
|
||||
options.stylix = {
|
||||
scheme = lib.mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = "dracula";
|
||||
description = ''
|
||||
Base16 color scheme name. Available options are:
|
||||
${toString validSchemes}
|
||||
|
||||
Set to `null` to generate a color scheme from `stylix.image`
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
@ -66,11 +68,15 @@ in
|
|||
assertion = builtins.elem cfg.scheme validSchemes;
|
||||
message = "Stylix: Invalid colorscheme '${cfg.scheme}'. Available options: ${toString validSchemes}";
|
||||
}
|
||||
{
|
||||
assertion = (cfg.scheme != null) || (cfg.image != null);
|
||||
message = "Stylix: You need to set stylix.image if stylix.scheme is `null`";
|
||||
}
|
||||
];
|
||||
|
||||
stylix = {
|
||||
autoEnable = mkDefault true;
|
||||
base16Scheme = scheme;
|
||||
base16Scheme = mkIf (cfg.scheme != null) scheme;
|
||||
fonts = {
|
||||
monospace = mkDefault {
|
||||
package = pkgs.hack-font;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue