-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-linux.sh
More file actions
executable file
·88 lines (73 loc) · 2.63 KB
/
install-linux.sh
File metadata and controls
executable file
·88 lines (73 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
# Dotfiles installer
# Usage: ./install.sh
set -e
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "=== Installing dotfiles ==="
# Step 1: Install additional packages
echo ""
echo "Step 1: Installing packages..."
"$DOTFILES_DIR/scripts/packages.sh"
# Step 2: Setup mise runtimes
echo ""
echo "Step 2: Setting up mise..."
"$DOTFILES_DIR/mise/setup.sh"
# Step 2a: Setup Claude Code MCP servers
echo ""
echo "Step 2a: Setting up Claude Code MCP servers..."
"$DOTFILES_DIR/claude/setup-mcp.sh"
# Step 3: Remove unwanted packages
echo ""
echo "Step 3: Cleaning up unwanted packages..."
"$DOTFILES_DIR/scripts/cleanup.sh"
# Step 4: Stow config files
echo ""
echo "Step 4: Stowing config files..."
cd "$DOTFILES_DIR"
packages=(bash nushell starship hyprwhspr vscode mise bin claude waybar)
for package in "${packages[@]}"; do
if [ -d "$package" ]; then
echo " Stowing $package..."
# First unstow to clean up any existing links
stow -D --target="$HOME" "$package" 2>/dev/null || true
# Remove any existing non-symlink files that would conflict with stow
while IFS= read -r target; do
target="$HOME/$target"
if [ -e "$target" ] && [ ! -L "$target" ]; then
echo " Removing conflicting file: $target"
rm -f "$target"
fi
done < <(cd "$DOTFILES_DIR/$package" && find . -type f ! -name 'setup.sh' | sed 's|^\./||')
# Then stow fresh (ignore setup.sh scripts which are run separately)
stow -v --ignore='setup\.sh' --target="$HOME" "$package"
fi
done
# Hypr configs need individual symlinks (directory has other non-managed files)
# Remove all first, then create all, to avoid partial state during hyprland auto-reload
echo " Linking hypr configs..."
for file in "$DOTFILES_DIR"/hypr/.config/hypr/*.conf; do
rm -f "$HOME/.config/hypr/$(basename "$file")"
done
for file in "$DOTFILES_DIR"/hypr/.config/hypr/*.conf; do
ln -sv "$file" "$HOME/.config/hypr/$(basename "$file")"
done
hyprctl reload 2>/dev/null || true
# Step 5: Setup VS Code
echo ""
echo "Step 5: Setting up VS Code..."
"$DOTFILES_DIR/vscode/setup.sh"
# Step 6: Setup Docker daemon config
echo ""
echo "Step 6: Setting up Docker..."
"$DOTFILES_DIR/docker/setup.sh"
# Step 7: Set nushell as default shell
if command -v nu &> /dev/null; then
current_shell=$(getent passwd "$USER" | cut -d: -f7)
if [ "$current_shell" != "/usr/bin/nu" ]; then
echo ""
echo "Step 7: Setting nushell as default shell..."
sudo chsh -s /usr/bin/nu "$USER"
fi
fi
echo ""
echo "=== Done! Log out and back in for changes to take effect ==="