update for ubuntu nix
This commit is contained in:
@@ -4,6 +4,7 @@ set -euo pipefail
|
||||
echo "🔍 Checking if Nix is installed..."
|
||||
if ! command -v nix &> /dev/null; then
|
||||
echo "❌ Nix is not installed. Install it from https://nixos.org/download.html"
|
||||
echo "$ curl -L https://nixos.org/nix/install | sh -s -- --daemon"
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ Nix is installed."
|
||||
@@ -23,6 +24,15 @@ if [ -x "$HM_BIN" ]; then
|
||||
echo " Ensure it's not managing your home separately from your flake config."
|
||||
fi
|
||||
|
||||
STATE_DIR="$HOME/.local/state/nix/profiles"
|
||||
if [ ! -d "$STATE_DIR" ]; then
|
||||
echo "📁 Creating Nix state dir at: $STATE_DIR"
|
||||
mkdir -p "$STATE_DIR"
|
||||
fi
|
||||
|
||||
echo
|
||||
read -r -p "🚀 Do you want to check the Home Manager configuration for duplicate packages now? [y/N] " confirm_packages
|
||||
if [[ "$confirm_packages" =~ ^[Yy]$ ]]; then
|
||||
echo "📦 Gathering APT-installed packages..."
|
||||
apt list --manual-installed 2>/dev/null | awk -F/ '{print tolower($1)}' | sort > /tmp/apt-installed.txt
|
||||
|
||||
@@ -72,6 +82,7 @@ rm /tmp/home-manager-packages.txt
|
||||
rm /tmp/duplicate-packages.txt
|
||||
rm /tmp/exact-matches.txt
|
||||
rm /tmp/fuzzy-matches.txt
|
||||
fi
|
||||
|
||||
# check username and home dir
|
||||
EXPECTED_USERNAME="wieerwill"
|
||||
|
||||
Reference in New Issue
Block a user