wip
This commit is contained in:
28
hexyl
Normal file
28
hexyl
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
sed -i -e '$a\'$'\n''export PATH=$PATH:~/dotfiles/bin' ~/.bashrc
|
||||
|
||||
echo "#########################################################"
|
||||
echo "# #"
|
||||
echo "# !!! RESTART YOUR TERMINAL BEFORE YOU CONTINUE !!! #"
|
||||
echo "# !!! Continue with 'dotf update' !!! #"
|
||||
echo "# #"
|
||||
echo "#########################################################"
|
||||
Reference in New Issue
Block a user