refactor: streamline Nix installation process and simplify pipx installation
All checks were successful
Nix Format Check / check-format (push) Successful in 38s

This commit is contained in:
Menno van Leeuwen 2025-01-22 16:00:37 +01:00
parent c26a952af9
commit 36ebbef6d7
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -141,10 +141,6 @@ install_nix() {
sh install-nix.sh install || die "Failed to install Nix" sh install-nix.sh install || die "Failed to install Nix"
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh || die "Failed to source Nix profile" . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh || die "Failed to source Nix profile"
log_success "Nix has been installed. Please open a new shell and re-run the script."
log_info "'~/dotfiles/setup.sh --continue' to continue setup."
exit 0
} }
setup_symlinks() { setup_symlinks() {
@ -248,15 +244,7 @@ ensure_pipx() {
if ! command -v pipx >/dev/null 2>&1; then if ! command -v pipx >/dev/null 2>&1; then
log_info "Installing pipx..." log_info "Installing pipx..."
# On Fedora/RedHat, install pipx using dnf attempt_package_install "pipx"
if command -v dnf >/dev/null 2>&1; then
sudo dnf install pipx || die "Failed to install pipx"
fi
# On Ubuntu/Debian, install pipx using apt
if command -v apt >/dev/null 2>&1; then
sudo apt install pipx || die "Failed to install pipx"
fi
# On Arch Linux, install pipx using pacman # On Arch Linux, install pipx using pacman
if command -v pacman >/dev/null 2>&1; then if command -v pacman >/dev/null 2>&1; then