diff --git a/stylix/palette.nix b/stylix/palette.nix index afe12df0..ba8159a8 100644 --- a/stylix/palette.nix +++ b/stylix/palette.nix @@ -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 [ {