stylix: check base16Scheme is not null before using mkSchemeAttrs (#1408)
Link: https://github.com/nix-community/stylix/pull/1408 Closes: https://github.com/nix-community/stylix/issues/1046 Closes: https://github.com/nix-community/stylix/issues/1385 Reviewed-by: awwpotato <awwpotato@voidq.com>
This commit is contained in:
parent
2579395763
commit
3a4599a330
1 changed files with 8 additions and 1 deletions
|
|
@ -164,7 +164,14 @@ in
|
|||
config = {
|
||||
# This attrset can be used like a function too, see
|
||||
# https://github.com/SenchoPens/base16.nix/blob/b390e87cd404e65ab4d786666351f1292e89162a/README.md#theme-step-22
|
||||
lib.stylix.colors = (cfg.base16.mkSchemeAttrs cfg.base16Scheme).override cfg.override;
|
||||
#
|
||||
# NOTE: base16Scheme is nullable. If null, we cannot pass it to mkSchemeAttrs.
|
||||
# See https://github.com/nix-community/stylix/pull/1408
|
||||
lib.stylix.colors =
|
||||
if cfg.base16Scheme == null then
|
||||
null
|
||||
else
|
||||
(cfg.base16.mkSchemeAttrs cfg.base16Scheme).override cfg.override;
|
||||
|
||||
assertions = lib.mkIf cfg.enable [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue