feat: implement modular foundation and core system services
- Update flake.nix with 25.11 release and core inputs - Add dedicated modules for audio (Pipewire), bluetooth, and networking - Update GEMINI.md with the new Modular Merging Architecture blueprint - Configure graphical installer ISO and test VM outputs
This commit is contained in:
@@ -1,23 +1,27 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Show a fuzzy-finder TUI for picking packages installed on the system to be removed.
|
||||
PKG_NAME="$1"
|
||||
|
||||
fzf_args=(
|
||||
--multi
|
||||
--preview 'yay -Qi {1}'
|
||||
--preview-label='alt-p: toggle description, alt-j/k: scroll, tab: multi-select'
|
||||
--preview-label-pos='bottom'
|
||||
--preview-window 'down:65%:wrap'
|
||||
--bind 'alt-p:toggle-preview'
|
||||
--bind 'alt-d:preview-half-page-down,alt-u:preview-half-page-up'
|
||||
--bind 'alt-k:preview-up,alt-j:preview-down'
|
||||
--color 'pointer:red,marker:red'
|
||||
)
|
||||
|
||||
pkg_names=$(yay -Qqe | fzf "${fzf_args[@]}")
|
||||
|
||||
if [[ -n $pkg_names ]]; then
|
||||
# Convert newline-separated selections to space-separated for yay
|
||||
echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -Rns --noconfirm
|
||||
nomarchy-show-done
|
||||
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 ". | index(\"$PKG_NAME\")" "$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
|
||||
jq ". - [\"$PKG_NAME\"]" "$STATE_FILE" > "${STATE_FILE}.tmp" && mv "${STATE_FILE}.tmp" "$STATE_FILE"
|
||||
|
||||
echo "Package $PKG_NAME removed declaratively from $STATE_FILE."
|
||||
echo "Applying changes with env-update..."
|
||||
env-update
|
||||
|
||||
Reference in New Issue
Block a user