forked from Shinonome/omarchy-nix
Fixes
This commit is contained in:
+2
-1
@@ -27,7 +27,8 @@ lib: {
|
|||||||
type = lib.types.submodule {
|
type = lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
wallpaper_path = lib.mkOption {
|
wallpaper_path = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.nullOr lib.types.path;
|
||||||
|
default = null;
|
||||||
description = "Path to the wallpaper image to extract colors from";
|
description = "Path to the wallpaper image to extract colors from";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ config: let
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Handle wallpaper path for generated themes and overrides
|
# Handle wallpaper path for generated themes and overrides
|
||||||
wallpaper_path = if (cfg.theme == "generated_light" || cfg.theme == "generated_dark") || (cfg.theme_overrides ? wallpaper_path)
|
wallpaper_path = if (cfg.theme == "generated_light" || cfg.theme == "generated_dark") || (cfg.theme_overrides.wallpaper_path != null)
|
||||||
then toString cfg.theme_overrides.wallpaper_path
|
then toString cfg.theme_overrides.wallpaper_path
|
||||||
else let
|
else let
|
||||||
selected_wallpaper = builtins.elemAt (wallpapers.${cfg.theme}) 0;
|
selected_wallpaper = builtins.elemAt (wallpapers.${cfg.theme}) 0;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ inputs: {
|
|||||||
else themes.${config.omarchy.theme};
|
else themes.${config.omarchy.theme};
|
||||||
|
|
||||||
# Generate color scheme from wallpaper for generated themes
|
# Generate color scheme from wallpaper for generated themes
|
||||||
generatedColorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") || (config.omarchy.theme_overrides ? wallpaper_path)
|
generatedColorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark")
|
||||||
then (inputs.nix-colors.lib.contrib { inherit pkgs; }).colorSchemeFromPicture {
|
then (inputs.nix-colors.lib.contrib { inherit pkgs; }).colorSchemeFromPicture {
|
||||||
path = config.omarchy.theme_overrides.wallpaper_path;
|
path = config.omarchy.theme_overrides.wallpaper_path;
|
||||||
variant = if config.omarchy.theme == "generated_light" then "light" else "dark";
|
variant = if config.omarchy.theme == "generated_light" then "light" else "dark";
|
||||||
@@ -47,7 +47,7 @@ in {
|
|||||||
};
|
};
|
||||||
home.packages = packages.homePackages;
|
home.packages = packages.homePackages;
|
||||||
|
|
||||||
colorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") || (config.omarchy.theme_overrides ? wallpaper_path)
|
colorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark")
|
||||||
then generatedColorScheme
|
then generatedColorScheme
|
||||||
else inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme};
|
else inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user