feat: add NixOS support, Go, and Ruby on Rails; remove Rust
- Add nixos/ directory with declarative flake.nix and home.nix for NixOS - Make all setup scripts NixOS-aware with proper detection and early exit - Update bashrc, zshrc, and aliases with Go, Ruby on Rails, and Nix profile paths - Replace Rust/Cargo references in shell configs with rbenv/Ruby on Rails - Update README with NixOS quick start and full documentation
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
# 01-package-install.sh
|
||||
# Installs system packages and Flatpak applications.
|
||||
# Relies on DISTRO and PACKAGE_MANAGER being set by the caller.
|
||||
# Supports NixOS (nix profile), Fedora (dnf), and Debian/Ubuntu (apt).
|
||||
|
||||
echo "--- Starting Package Installation ---"
|
||||
|
||||
@@ -11,6 +12,26 @@ if [ -z "$DISTRO" ] || [ -z "$PACKAGE_MANAGER" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ── NixOS path ─────────────────────────────────────────────
|
||||
if [ "$DISTRO" == "nixos" ]; then
|
||||
echo "NixOS detected: packages are managed declaratively via nixos/flake.nix"
|
||||
echo "and nixos/home.nix. Run the main-setup.sh workflow or apply manually."
|
||||
echo ""
|
||||
echo " sudo nixos-rebuild switch --flake ~/dotfiles/nixos#nixos"
|
||||
echo " home-manager switch --flake ~/dotfiles/nixos#blake"
|
||||
echo ""
|
||||
echo "If you want imperative ad-hoc packages, uncomment the lines below"
|
||||
echo "or run manually:"
|
||||
echo ""
|
||||
echo " nix profile install nixpkgs#<package>"
|
||||
echo ""
|
||||
echo "Skipping imperative package installation."
|
||||
echo "--- Package Installation Finished ---"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# ── Traditional distro path (Fedora / Ubuntu / Debian) ─────
|
||||
|
||||
# Define base package list
|
||||
BASE_PACKAGE_LIST=(
|
||||
ansible
|
||||
@@ -127,7 +148,7 @@ done
|
||||
if [ "$PACKAGE_MANAGER" == "apt" ] && command -v fdfind &>/dev/null && ! command -v fd &>/dev/null; then
|
||||
if dpkg-query -W -f='${Status}' "fd-find" 2>/dev/null | grep -q "ok installed"; then
|
||||
echo "Creating symlink for fd from fdfind..."
|
||||
sudo ln -sf /usr/bin/fdfind /usr/local/bin/fd
|
||||
sudo ln -sf /usr/bin/fdfind /usr/local/bin/fd
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user