Fix evaluation error when manual scheme is used 🚑

This commit is contained in:
Daniel Thwaites 2022-10-30 14:20:55 +00:00
parent 655fda7894
commit 1741e9c710
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D

View file

@ -84,12 +84,12 @@ in {
# https://github.com/SenchoPens/base16.nix#mktheme
lib.stylix.colors = base16.mkSchemeAttrs cfg.base16Scheme;
environment.etc = {
environment.etc = mkIf (cfg.base16Scheme == generatedScheme) {
# Making palette.json part of the system closure will protect it from
# garbage collection, so future configurations can be evaluated without
# having to generate the palette again. The generator is not kept, only
# the palette which came from it, so this uses very little disk space.
"stylix/palette.json".source = mkIf (cfg.base16Scheme == generatedScheme) paletteJSON;
"stylix/palette.json".source = paletteJSON;
# We also provide a HTML version which is useful for viewing the colors
# during development.