-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·67 lines (57 loc) · 1.96 KB
/
setup.sh
File metadata and controls
executable file
·67 lines (57 loc) · 1.96 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
#!/bin/bash
# Simple setup script for remaining configurations
# Most dotfiles are now managed by Nix Home Manager
set -e
echo "🎯 Dotfiles Setup"
echo "================="
echo ""
echo "ℹ️ Most configuration files are managed by Nix Home Manager."
echo " Run 'nix-switch' to apply Nix-managed configurations."
echo ""
# Ensure .config directory exists
mkdir -p "$HOME/.config"
# Handle Karabiner configuration (requires symlinking due to TypeScript build process)
if [ -d "$(pwd)/config/karabiner" ]; then
if [ ! -e "$HOME/.config/karabiner" ]; then
echo "🔗 Linking Karabiner configuration..."
ln -s "$(pwd)/config/karabiner" "$HOME/.config/karabiner"
echo " ✅ Karabiner configuration linked"
else
echo " ℹ️ Karabiner configuration already exists"
fi
fi
# Platform-specific setup
setup_linux() {
echo ""
echo "🐧 Linux setup..."
# Install Nerd Fonts
if [ ! -d "$HOME/.local/share/fonts/FiraCode" ]; then
echo "📦 Installing FiraCode Nerd Font..."
mkdir -p "$HOME/.local/share/fonts/FiraCode"
cd /tmp
wget -q --show-progress https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.zip
unzip -q FiraCode.zip -d "$HOME/.local/share/fonts/FiraCode"
fc-cache -f "$HOME/.local/share/fonts/FiraCode" 2>/dev/null || true
echo " ✅ FiraCode font installed"
cd - >/dev/null
fi
}
setup_mac() {
echo ""
echo "🍎 macOS setup..."
echo " ℹ️ macOS configurations are handled by nix-darwin"
echo " ℹ️ Run 'darwin-rebuild switch --flake .' for system settings"
}
# Platform detection and setup
case "$(uname)" in
Linux*) setup_linux ;;
Darwin*) setup_mac ;;
*) echo "❌ Unsupported platform" ;;
esac
echo ""
echo "🎉 Setup complete!"
echo ""
echo "Next steps:"
echo " • Run 'nix-switch' to apply Home Manager configurations"
echo " • Run 'darwin-rebuild switch --flake .' for macOS system settings (macOS only)"
echo " • Restart your shell or run 'source ~/.zshrc'"