wip
This commit is contained in:
27
setup.sh
27
setup.sh
@ -1,21 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Prepare, we need at least these minimal packages to continue ...
|
||||
sudo apt update
|
||||
sudo apt install curl nala pipx apt-transport-https ca-certificates gnupg -y
|
||||
|
||||
# Ensure shyaml is available
|
||||
echo "Ensuring shyaml is installed..."
|
||||
if [ ! -x "$(command -v shyaml)" ]; then
|
||||
echo " - shyaml is not installed, installing it..."
|
||||
pipx install shyaml
|
||||
# Check if nixos-version is available
|
||||
if [ -x "$(command -v nixos-version)" ]; then
|
||||
echo "Detected NixOS, skipping Nix setup."
|
||||
return
|
||||
else
|
||||
echo "NixOS not detected, installing Nix..."
|
||||
sh <(curl -L https://nixos.org/nix/install) --daemon
|
||||
fi
|
||||
|
||||
echo "Ensuring pyenv is installed..."
|
||||
if [ ! -d "$HOME/.pyenv" ]; then
|
||||
curl https://pyenv.run | bash
|
||||
else
|
||||
echo " - pyenv is already installed"
|
||||
# Check if sed is available
|
||||
if [ ! -x "$(command -v sed)" ]; then
|
||||
echo "sed is not available, please manually source the following lines in your .bashrc:"
|
||||
echo "export PATH=$PATH:$HOME/.local/bin"
|
||||
echo "export PATH=$PATH:~/dotfiles/bin"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i -e '$a\'$'\n''export PATH=$PATH:$HOME/.local/bin' ~/.bashrc
|
||||
|
Reference in New Issue
Block a user