diff --git a/option/Wallpaper.nix b/option/Wallpaper.nix index 2f039de..3369e59 100644 --- a/option/Wallpaper.nix +++ b/option/Wallpaper.nix @@ -30,7 +30,13 @@ in }; style = lib.mkOption { default = style; - type = with lib.types; nullOr (oneOf [ path lines attrs ]); + type = + with lib.types; + nullOr (oneOf [ + path + lines + attrs + ]); }; }; } diff --git a/system/Stylix.nix b/system/Stylix.nix index aff4989..80f1422 100644 --- a/system/Stylix.nix +++ b/system/Stylix.nix @@ -4,43 +4,38 @@ let wallpaper = config.module.wallpaper; in { - config = lib.mkMerge [ + stylix = { - stylix = { - inherit (config.module.style) cursor; - enable = true; - autoEnable = true; - image = wallpaper.path; - polarity = "dark"; - fonts = with style.font; { - inherit - emoji - monospace - sansSerif - serif - ; - sizes = with size; { - inherit desktop terminal; - applications = application; - popups = popup; - }; - }; - opacity = with style.opacity; { + inherit (config.module.style) cursor; + enable = true; + autoEnable = true; + image = wallpaper.path; + polarity = "dark"; + fonts = with style.font; { + inherit + emoji + monospace + sansSerif + serif + ; + sizes = with size; { inherit desktop terminal; applications = application; - popups = popups; + popups = popup; }; }; + opacity = with style.opacity; { + inherit desktop terminal; + applications = application; + popups = popups; + }; } - - (lib.mkIf wallpaper.forceContrastText { - stylix.override = { + // (lib.optionalAttrs wallpaper.forceContrastText { + override = { base04 = lib.mkForce "000000"; base05 = lib.mkForce "ffffff"; base06 = lib.mkForce "ffffff"; }; }) - - (lib.mkIf (wallpaper.style != null) { stylix.base16Scheme = wallpaper.style; }) - ]; + // (lib.optionalAttrs (wallpaper.style != null) { base16Scheme = wallpaper.style; }); }