fix(theme): set default to summer-night and fix scripts on live ISO

- 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.
This commit is contained in:
Bernardo Magri
2026-05-18 21:22:39 +01:00
parent ec6046793e
commit 7bf4c3c637
17 changed files with 32 additions and 27 deletions

View File

@@ -1,11 +0,0 @@
# If not running interactively, don't do anything (leave this at the top of this file)
[[ $- != *i* ]] && return
# All the default Nomarchy aliases and functions
# (don't mess with these directly, just overwrite them here!)
source ~/.config/nomarchy/default/bash/rc
# Add your own exports, aliases, and functions here.
#
# Make an alias for invoking commands you use constantly
# alias p='python'

View File

@@ -32,8 +32,7 @@ end
function GetEntries()
local entries = {}
local user_theme_dir = os.getenv("HOME") .. "/.config/nomarchy/themes"
local nomarchy_path = os.getenv("NOMARCHY_PATH") or "/etc/nixos"
local default_theme_dir = nomarchy_path .. "/themes/palettes"
local default_theme_dir = os.getenv("HOME") .. "/.local/share/nomarchy/themes"
local seen_themes = {}

View File

@@ -52,4 +52,8 @@ let
in
{
xdg.configFile = configMappings;
home.file.".XCompose" = lib.mkDefault {
source = ./config/nomarchy/default/xcompose;
};
}

View File

@@ -5,7 +5,7 @@ let
pname = "nomarchy-font";
version = "1.0";
# Point directly to the font file
src = ./../home/config/Nomarchy.ttf;
src = ./../branding/Nomarchy.ttf;
# No archive to unpack
unpackPhase = "true";
installPhase = ''

View File

@@ -55,8 +55,7 @@ pkgs.stdenv.mkDerivation {
for file in $out/bin/*; do
if [ -f "$file" ]; then
wrapProgram "$file" \
--prefix PATH : "$deps" \
--set NOMARCHY_PATH "/etc/nixos"
--prefix PATH : "$deps"
fi
done
'';

View File

@@ -28,16 +28,25 @@ echo ""
# 1. Select initial theme
echo "Step 1: Choose your starting theme"
nomarchy-theme-set "$(nomarchy-theme-list | gum filter --placeholder 'Select a theme...')" --no-update
SELECTED_THEME="$(nomarchy-theme-list | gum filter --placeholder 'Select a theme...')"
if [[ -n "$SELECTED_THEME" ]]; then
THEME_ID=$(echo "$SELECTED_THEME" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
nomarchy-theme-set "$THEME_ID" --no-update
fi
# 2. Select initial font
echo "Step 2: Choose your preferred font"
nomarchy-font-set "$(nomarchy-font-list | gum filter --placeholder 'Select a font...')" --no-update
SELECTED_FONT="$(nomarchy-font-list | gum filter --placeholder 'Select a font...')"
if [[ -n "$SELECTED_FONT" ]]; then
nomarchy-font-set "$SELECTED_FONT" --no-update
fi
# 3. Select panel position
echo "Step 3: Choose your preferred panel position"
POSITION=$(gum choose "top" "bottom")
nomarchy-state-write panelPosition "$POSITION"
if [[ -n "$POSITION" ]]; then
nomarchy-state-write panelPosition "$POSITION"
fi
# Skip system-modifying steps in the Live ISO environment
if [[ "$USER" == "nixos" ]]; then

View File

@@ -1350,7 +1350,7 @@ execute_installation() {
mkdir -p /mnt/persist/etc
mv /mnt/etc/nixos /mnt/persist/etc/
mkdir -p /mnt/etc
ln -s /persist/etc/nixos /mnt/etc/nixos
ln -s ../persist/etc/nixos /mnt/etc/nixos
success "Impermanence configured"
fi

View File

@@ -6,7 +6,7 @@
# Home state defaults (user preferences)
home = {
# Theme and appearance
theme = "nord";
theme = "summer-night";
wallpaper = "";
font = "JetBrainsMono Nerd Font";
panelPosition = "top";
@@ -31,7 +31,7 @@
# System state defaults (system-level configuration)
system = {
# Theme (can differ from home for system-level theming)
theme = "nord";
theme = "summer-night";
# Timezone
timezone = "UTC";

View File

@@ -83,6 +83,12 @@ in
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;
}

View File

@@ -40,8 +40,7 @@ let
for file in $out/bin/*; do
if [ -f "$file" ]; then
wrapProgram "$file" \
--prefix PATH : "$deps" \
--set NOMARCHY_PATH "/etc/nixos"
--prefix PATH : "$deps"
fi
done
'';

View File

@@ -2,8 +2,8 @@
set -e
{
find ~/.config/nomarchy/themes/ -mindepth 1 -maxdepth 1 \( -type d -o -type l \) -printf '%f\n'
find "$NOMARCHY_PATH/themes/palettes/" -mindepth 1 -maxdepth 1 -type d -printf '%f\n'
find ~/.config/nomarchy/themes/ -mindepth 1 -maxdepth 1 \( -type d -o -type l \) -printf '%f\n' 2>/dev/null || true
find ~/.local/share/nomarchy/themes/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' 2>/dev/null || true
} | sort -u | while read -r name; do
echo "$name" | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g'
done

View File

@@ -1,7 +1,7 @@
#!/bin/bash
set -e
TEMPLATES_DIR="$NOMARCHY_PATH/themes/templates"
TEMPLATES_DIR="$HOME/.local/share/nomarchy/templates"
USER_TEMPLATES_DIR="$HOME/.config/nomarchy/themes/templates"
NEXT_THEME_DIR="$HOME/.config/nomarchy/current/theme"
COLORS_FILE="$NEXT_THEME_DIR/colors.toml"