- Update lib/state-schema.nix to default both home and system themes to 'summer-night'.
- Fix 'nomarchy-theme-list' and 'nomarchy-theme-set-templates' to resolve themes and templates from '~/.local/share/nomarchy' instead of the obsolete '$NOMARCHY_PATH' (fixing failures on Live ISO).
- Update 'nomarchy-welcome' to properly convert Title Case theme display names back to kebab-case identifiers and add input validation to prevent crashes.
- Fix installer impermanence symlink by using a relative path ('../persist/etc/nixos'), ensuring it resolves during 'nixos-install' both inside and outside the chroot.
- Deploy '~/.XCompose' symlink via Home Manager and add 'nomarchy-restart-xcompose' to the menu.
- Relocate 'Nomarchy.ttf' to 'core/branding/' and move user-level scripts ('pkg-add', 'pkg-remove', 'env-update', 'preflight-migration') to 'features/scripts/utils/' to align with the distro architecture.
- Remove obsolete '$NOMARCHY_PATH' exports and redundant 'bashrc' template.
- Export theme templates via 'xdg.dataFile' for script accessibility.
95 lines
3.7 KiB
Nix
95 lines
3.7 KiB
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
nomarchyLib = import ../../lib { inherit lib; };
|
|
themePath = ../palettes + "/${config.nomarchy.theme}";
|
|
themeAppsPath = themePath + "/apps";
|
|
nordAppsPath = ../../features/desktop/hyprland/themes/nord;
|
|
hyprlandThemePath = ../../features/desktop/hyprland/themes + "/${config.nomarchy.theme}";
|
|
|
|
# Check if theme has hyprland.conf in palette apps/ or feature themes/
|
|
hasHyprlandConf = builtins.pathExists (themeAppsPath + "/hyprland.conf");
|
|
hasHyprlandFeatureConf = builtins.pathExists (hyprlandThemePath + "/hyprland.conf");
|
|
|
|
hyprlandConfSource =
|
|
if hasHyprlandConf then themeAppsPath + "/hyprland.conf"
|
|
else if hasHyprlandFeatureConf then hyprlandThemePath + "/hyprland.conf"
|
|
else nordAppsPath + "/hyprland.conf";
|
|
|
|
# Get palette for dynamic CSS generation
|
|
palette = nomarchyLib.getPalette config.nomarchy.theme;
|
|
in
|
|
{
|
|
xdg.configFile."nomarchy/current/theme" = {
|
|
source = themePath;
|
|
recursive = true;
|
|
};
|
|
|
|
# Generate waybar.css if it doesn't exist in the theme
|
|
# This provides the @background and @foreground variables used by the default style
|
|
xdg.configFile."nomarchy/current/theme/waybar.css".text = ''
|
|
@define-color background #${palette.base00};
|
|
@define-color foreground #${palette.base05};
|
|
@define-color accent #${palette.base0D};
|
|
'';
|
|
|
|
# Ensure theme-specific hyprland config exists
|
|
# Lookup priority: palette apps/ > feature themes/ > nord fallback
|
|
xdg.configFile."nomarchy/current/theme/apps/hyprland.conf" = lib.mkIf (!hasHyprlandConf) {
|
|
source = if hasHyprlandFeatureConf then hyprlandThemePath + "/hyprland.conf"
|
|
else nordAppsPath + "/hyprland.conf";
|
|
};
|
|
|
|
# Legacy compatibility: symlink apps/hyprland.conf to root for scripts expecting old path
|
|
xdg.configFile."nomarchy/current/theme/hyprland.conf" = {
|
|
source = hyprlandConfSource;
|
|
};
|
|
|
|
# Rofi fallback support
|
|
xdg.configFile."rofi/config.rasi" = lib.mkIf (builtins.pathExists (themeAppsPath + "/rofi.rasi")) {
|
|
source = themeAppsPath + "/rofi.rasi";
|
|
};
|
|
|
|
# Walker fallback support
|
|
xdg.configFile."nomarchy/current/theme/apps/walker/style.css" = lib.mkIf (!builtins.pathExists (themeAppsPath + "/walker/style.css")) {
|
|
text = ''
|
|
* {
|
|
color: #${palette.base05};
|
|
}
|
|
#window {
|
|
background-color: #${palette.base00};
|
|
}
|
|
.item.active {
|
|
background-color: #${palette.base03};
|
|
color: #${palette.base0B};
|
|
}
|
|
'';
|
|
};
|
|
|
|
xdg.configFile."nomarchy/current/theme.name".text = config.nomarchy.theme;
|
|
|
|
# Expose branding assets
|
|
xdg.configFile."nomarchy/branding/logo.png".source = ../../core/branding/logo.png;
|
|
xdg.configFile."nomarchy/branding/logo.txt".source = ../../core/branding/logo.txt;
|
|
xdg.configFile."nomarchy/branding/logo.svg".source = ../../core/branding/logo.svg;
|
|
xdg.configFile."nomarchy/branding/icon.png".source = ../../core/branding/icon.png;
|
|
xdg.configFile."nomarchy/branding/icon.txt".source = ../../core/branding/icon.txt;
|
|
xdg.configFile."nomarchy/branding/screensaver.txt".source = ../../core/branding/screensaver.txt;
|
|
xdg.configFile."nomarchy/branding/about.txt".source = ../../core/branding/about.txt;
|
|
|
|
# Expose all themes to the system via local share for script accessibility
|
|
xdg.dataFile."nomarchy/themes".source = builtins.path {
|
|
name = "nomarchy-themes";
|
|
path = ../palettes;
|
|
};
|
|
|
|
# Expose all theme templates to the system via local share
|
|
xdg.dataFile."nomarchy/templates".source = builtins.path {
|
|
name = "nomarchy-templates";
|
|
path = ../templates;
|
|
};
|
|
|
|
# Nautilus python extensions
|
|
xdg.dataFile."nautilus-python/extensions/localsend.py".source = ../../core/home/config/nautilus-python/extensions/localsend.py;
|
|
}
|