-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·116 lines (96 loc) · 2.51 KB
/
setup.sh
File metadata and controls
executable file
·116 lines (96 loc) · 2.51 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/usr/bin/env bash
set -e # Exit on any error
echo "Setting up Fedora Linux development environment..."
# 1. System Update and Essential Packages
echo "Step 1: Updating system and installing essential packages..."
# sudo dnf update -y
sudo dnf copr enable atim/lazygit -y
sudo dnf install -y \
git \
curl \
wget \
stow \
zsh \
dnf-plugins-core \
ripgrep \
neovim \
nodejs \
npm \
yarn \
lua \
luarocks \
socat \
ffmpeg \
mpv \
lazygit \
tmux
# 2. Shell and Terminal Setup
echo "Step 2: Setting up shell and terminal..."
# Install Oh My Zsh
if test ! $(which omz); then
echo "Installing Oh My Zsh..."
rm -f ~/.zshrc
env CHSH=no RUNZSH=no /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/HEAD/tools/install.sh)"
fi
sudo sh -c 'echo /usr/sbin/zsh >> /etc/shells'
chsh -s $(which zsh)
# Install Antidote plugin manager
if [[ ! -d "$HOME/.antidote" ]]; then
echo "Installing Antidote..."
git clone --depth=1 https://github.com/mattmc3/antidote.git $HOME/.antidote
fi
# Install Starship prompt
if test ! $(command -v starship); then
echo "Installing Starship..."
curl -sS https://starship.rs/install.sh | sh -s -- -y
fi
# 3. Development Tools Setup
echo "Step 3: Setting up development tools..."
# Install pyenv and dependencies
if [[ ! -d "$HOME/.pyenv" ]]; then
echo "Installing pyenv..."
curl https://pyenv.run | bash
fi
echo "Installing pyenv build dependencies..."
sudo dnf install -y \
make \
gcc \
patch \
zlib-devel \
bzip2 \
bzip2-devel \
readline-devel \
sqlite \
sqlite-devel \
openssl-devel \
tk-devel \
libffi-devel \
xz-devel \
libuuid-devel \
gdbm-libs \
libnsl2
# Install Zellij terminal multiplexer
if test ! $(command -v zellij); then
echo "Installing Zellij..."
curl -L https://github.com/zellij-org/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz \
| tar xz
sudo mv zellij /usr/local/bin/
fi
# 4. Configuration Setup
echo "Step 4: Setting up configuration files..."
# Remove existing .zshenv and symlink our version
rm -rf $HOME/.zshenv
ln -sf $HOME/linux-dotfiles/zsh/.zshenv $HOME/.zshenv
# Use GNU Stow to symlink all configuration files
# Ensure .config directory exists
mkdir -p "$HOME/.config"
stow .
# 5. Final Steps
echo ""
echo "🎉 Fedora setup complete!"
echo ""
echo "Next steps:"
echo "1. Log out and back in for all changes to take effect"
echo "2. Or run: exec zsh to start using zsh immediately"
echo ""
echo "Your development environment is ready!"