chore(hygiene): final script cleanup and plymouth optimization

- Remove unused pkg and cmd helper scripts
- Optimize Plymouth settings for cleaner boot in all environments
- Skip hardware auto-detection logic in Live ISO environment
This commit is contained in:
Bernardo Magri
2026-04-04 21:34:02 +01:00
parent 4abd4d4686
commit 9d5049aed5
11 changed files with 125 additions and 86 deletions

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# Returns true if any of the commands passed in as arguments are missing on the system.
for cmd in "$@"; do
if ! command -v "$cmd" &>/dev/null; then
exit 0
fi
done
exit 1

View File

@@ -21,6 +21,11 @@ fi
# 3. Declarative hardware configuration check (nixos-hardware)
# This part ensures that if we are on an installed system, the correct
# nixos-hardware module is selected in the configuration.
# Skip this in the Live ISO environment
if [[ $USER == "nixos" ]] || [[ -f /etc/nixos/hosts/live-iso.nix ]]; then
exit 0
fi
HW_FILE="/etc/nixos/hardware-selection.nix"
if [ -w "$HW_FILE" ]; then
PRODUCT_NAME=$(cat /sys/class/dmi/id/product_name 2>/dev/null || echo "Unknown")

View File

@@ -1,15 +0,0 @@
#!/usr/bin/env bash
PKG_NAME="$1"
if [ -z "$PKG_NAME" ]; then
echo "Usage: nomarchy-pkg-missing <package-name>"
exit 1
fi
nomarchy-pkg-present "$PKG_NAME"
if [ $? -eq 0 ]; then
exit 1
else
exit 0
fi

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env bash
PKG_NAME="$1"
if [ -z "$PKG_NAME" ]; then
echo "Usage: nomarchy-pkg-present <package-name>"
exit 1
fi
STATE_FILE="$HOME/.config/home-manager/user-packages.json"
if [ ! -f "$STATE_FILE" ]; then
exit 1
fi
if jq -e ". | index(\"$PKG_NAME\")" "$STATE_FILE" >/dev/null; then
exit 0
else
exit 1
fi