diff --git a/option/Wallpaper.nix b/option/Wallpaper.nix index de5d3ee..2bcb8ea 100644 --- a/option/Wallpaper.nix +++ b/option/Wallpaper.nix @@ -4,6 +4,20 @@ let url = "https://i.imgur.com/KkZFMD3.png"; sha256 = "sha256-cTNUeamZTjQDx8gGZkU1mj4kKS3FEE0+EDzFb5bsyZE="; forceContrastText = false; + + # SEE: https://github.com/tinted-theming/schemes + # Blue: "${pkgs.base16-schemes}/share/themes/moonlight.yaml" + # Brown: "${pkgs.base16-schemes}/share/themes/sandcastle.yaml" + # Classy: "${pkgs.base16-schemes}/share/themes/monokai.yaml" + # Cold: "${pkgs.base16-schemes}/share/themes/nord.yaml" + # Cool: "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml" + # Gray: "${pkgs.base16-schemes}/share/themes/nova.yaml" + # Material: "${pkgs.base16-schemes}/share/themes/material.yaml" + # Purple: "${pkgs.base16-schemes}/share/themes/shades-of-purple.yaml" + # Retro: "${pkgs.base16-schemes}/share/themes/mocha.yaml" + # Warm: "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml" + # scheme = "${pkgs.base16-schemes}/share/themes/moonlight.yaml"; + scheme = null; in { options.module.wallpaper = { @@ -15,5 +29,15 @@ in default = pkgs.fetchurl { inherit url sha256; }; type = lib.types.path; }; + scheme = lib.mkOption { + default = scheme; + type = + with lib.types; + nullOr (oneOf [ + path + lines + attrs + ]); + }; }; } diff --git a/system/Stylix.nix b/system/Stylix.nix index 8d58bd6..9d60ac8 100644 --- a/system/Stylix.nix +++ b/system/Stylix.nix @@ -4,7 +4,7 @@ let wallpaper = config.module.wallpaper; in { - stylix = + stylix = lib.mkMerge [ { inherit (config.module.style) cursor; enable = true; @@ -30,11 +30,13 @@ in popups = popup; }; } - // (lib.optionalAttrs wallpaper.forceContrastText { + (lib.mkIf wallpaper.forceContrastText { override = { base04 = "000000"; base05 = "ffffff"; base06 = "ffffff"; }; - }); + }) + (lib.mkIf (wallpaper.scheme != null) { base16Scheme = wallpaper.scheme; }) + ]; }