-
Notifications
You must be signed in to change notification settings - Fork 0
/
podman_configuration_bash
38 lines (34 loc) · 1.22 KB
/
podman_configuration_bash
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
#!/usr/bin/env bash
if sudo -v; then
echo "Proceeding..."
# Part 1
sudo dnf update -y
sudo dnf groupinstall -y 'Development Tools'
sudo dnf install -y procps-ng curl file git lsd
# Part 2
if [ ! -d /home/linuxbrew ]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install fzf micro fd oh-my-posh topgrade ripgrep fish atuin bat bottom
sudo ln -s $(which fish) /bin/fish
sudo ln -s $(which fzf) /bin/fzf
sudo ln -s $(which fd) /bin/fd
sudo ln -s $(which micro) /bin/micro
sudo ln -s $(which rg) /bin/rg
sudo ln -s $(which bat) /bin/bat
sudo ln -s $(which btm) /bin/btm
fi
# Part 3
if [ ! -d /nix/ ]; then
sh <(curl -L https://nixos.org/nix/install) --daemon
fi
# Part 4
echo "/bin/fish" | sudo tee -a /etc/shells
echo "/usr/bin/fish" | sudo tee -a /etc/shells
sudo chsh user --shell /bin/fish
echo -e "Please manually execute the following as the script cannot do it:\nnix-env -i wslu"
exec bash
else
echo "You do not have sudo privileges."
exit 1
fi