refactor: safe stylix wallpaper path interpolation

This commit is contained in:
Bernardo Magri
2026-04-06 21:39:17 +01:00
parent db6bdd8495
commit 3e1b1efa6f

View File

@@ -6,8 +6,9 @@ let
activeThemeName = config.nomarchy.theme;
activeWallpaper = if config.nomarchy.wallpaper != "" then
# Use the absolute path from the state file (string format to avoid Nix Store copy)
config.nomarchy.wallpaper
else "${../../assets/themes/catppuccin/backgrounds/1-totoro.png}"; # Fallback
else ../../assets/themes/catppuccin/backgrounds/1-totoro.png; # Fallback path object (copied to store)
# Map nix-colors palette to a format Stylix expects (attrset of hex strings)
currentPalette = (palettes.${activeThemeName} or palettes.nord).palette;