- 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.
29 lines
754 B
Bash
Executable File
29 lines
754 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
PKG_NAME="$1"
|
|
|
|
if [ -z "$PKG_NAME" ]; then
|
|
echo "Usage: nomarchy-pkg-remove <package-name>"
|
|
exit 1
|
|
fi
|
|
|
|
STATE_FILE="$HOME/.config/home-manager/user-packages.json"
|
|
|
|
if [ ! -f "$STATE_FILE" ]; then
|
|
echo "No packages managed by nomarchy-pkg yet."
|
|
exit 0
|
|
fi
|
|
|
|
if ! jq -e --arg pkg "$PKG_NAME" '. | index($pkg)' "$STATE_FILE" >/dev/null; then
|
|
echo "Package $PKG_NAME is not in your user-packages.json"
|
|
exit 0
|
|
fi
|
|
|
|
# Remove package from the JSON array safely
|
|
jq --arg pkg "$PKG_NAME" '. - [$pkg]' "$STATE_FILE" > "${STATE_FILE}.tmp" && mv "${STATE_FILE}.tmp" "$STATE_FILE"
|
|
|
|
echo "Package $PKG_NAME removed declaratively from $STATE_FILE."
|
|
echo "Applying changes with nomarchy-env-update..."
|
|
nomarchy-env-update
|