-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathsetup
executable file
·63 lines (46 loc) · 1.5 KB
/
setup
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
#!/bin/bash
# Set up XDG_CONFIG_HOME
export XDG_CONFIG_HOME="$HOME"/.config
mkdir -p "$XDG_CONFIG_HOME"
mkdir -p "$XDG_CONFIG_HOME"/nixpkgs
# Create symlinks for existing configurations
ln -sf "$PWD/nvim" "$XDG_CONFIG_HOME"/nvim
ln -sf "$PWD/.inputrc" "$HOME"/.inputrc
ln -sf "$PWD/.tmux.conf" "$HOME"/.tmux.conf
ln -sf "$PWD/config.nix" "$XDG_CONFIG_HOME"/nixpkgs/config.nix
# Fetch and set up Zsh configuration files from my main dotfiles repo
curl -o "$HOME/.zshrc" https://raw.githubusercontent.com/mischavandenburg/dotfiles/main/.zshrc
curl -o "$HOME/.zprofile" https://raw.githubusercontent.com/mischavandenburg/dotfiles/main/.zprofile
# Install Nix packages from config.nix
# nix-env -iA nixpkgs.myPackages
# Nix is broken due to timeouts, falling back to brew
packages=(
fd
ripgrep
npm
lazygit
fzf
kubectl
fluxcd/tap/flux
k9s
kubectx
direnv
kubectl-cnpg
)
# Iterate over the array and install each package
for package in "${packages[@]}"; do
echo "Installing $package..."
/home/linuxbrew/.linuxbrew/bin/brew install "$package"
done
echo "All packages have been installed."
# Set up pure prompt
mkdir -p "$HOME/.zsh"
git clone https://github.com/sindresorhus/pure.git "$HOME/.zsh/pure"
# Silence source warning
touch "$HOME/.privaterc"
# Set up completions
midir -p "$HOME/.zfunc
flux completion zsh > $HOME/.zfunc/_flux
kubectl completion zsh > $HOME/.zfunc/_kubectl
helm completion zsh > $HOME/.zfunc/_helm
echo "Setup complete. Zsh configuration files have been downloaded and set up."