Skip to content

Commit

Permalink
chore(just): remove empty lines that were used for readability while …
Browse files Browse the repository at this point in the history
…writing the just recipes
  • Loading branch information
HikariKnight committed Jan 2, 2024
1 parent ddd96ac commit a9e5f86
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions build/ublue-os-just/70-nix.just
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,26 @@ setup-nix:
"Add nix path to sudo" \
"Remove nix path from sudo" \
)

if [ "$OPTION" == "Install" ]; then
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sudo bash -s -- install --no-confirm
sudo rm -f /etc/systemd/system/nix-daemon.service
sudo rm -f /etc/systemd/system/nix-daemon.socket
sudo cp /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.service
sudo cp /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket /etc/systemd/system/nix-daemon.socket

elif [ "$OPTION" == "Uninstall" ]; then
sudo /nix/nix-installer uninstall
sudo rm -f /etc/systemd/system/nix-daemon.service
sudo rm -f /etc/systemd/system/nix-daemon.socket

elif [ "$OPTION" == "Update nix user profile" ]; then
nix profile upgrade '.*'

elif [ "$OPTION" == "Update all nix profiles" ]; then
nix profile upgrade '.*'
sudo nix profile upgrade '.*'

elif [ "$OPTION" == "Re-copy nix systemd units to system" ]; then
sudo rm -f /etc/systemd/system/nix-daemon.service
sudo rm -f /etc/systemd/system/nix-daemon.socket
sudo cp /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.service
sudo cp /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket /etc/systemd/system/nix-daemon.socket

elif [ "$OPTION" == "Add nix path to sudo" ]; then
sudo echo "Adding sudo path variables for nix"
sudo rm -f /etc/sudoers.d/nix-sudo-env
Expand All @@ -52,13 +46,8 @@ setup-nix:
Defaults secure_path = /nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:$SUDOPATHVARIABLE5
EOF
sudo echo "Finished adding sudo variables for nix"

elif [ "$OPTION" == "Remove nix path from sudo" ]; then
sudo rm -f /etc/sudoers.d/nix-sudo-env

else
echo 'Exiting...'
exit 0
fi

# Install, uninstall or configure Fleek (https://getfleek.dev/)
Expand All @@ -70,19 +59,16 @@ setup-fleek:
fi
echo 'What would you like to do with Fleek?'
OPTION=$(ugum choose "Install Fleek" "Uninstall Fleek" "Integrate Nix/Fleek applications with system theme")

if [ "$OPTION" == "Install Fleek" ]; then
mkdir -p $HOME/.config/nix
echo "experimental-features = nix-command flakes" >> $HOME/.config/nix/nix.conf
curl -fsSL https://getfleek.dev/installer | env FORCE=1 bash

elif [ "$OPTION" == "Uninstall Fleek" ]; then
if [[ -x "/var/usrlocal/bin/fleek" ]]; then
sudo rm -f /var/usrlocal/bin/fleek
else
echo "Fleek is not installed or has been already removed"
fi

elif [ "$OPTION" == "Integrate Nix/Fleek applications with system theme" ]; then
if [[ -x "/var/usrlocal/bin/fleek" ]]; then
if command -v mutter; then
Expand Down Expand Up @@ -111,10 +97,8 @@ setup-devbox:
echo "Devbox is currently: ${CURRENT_STATE}"
echo 'What would you like to do with devbox?'
OPTION=$(ugum choose Install Uninstall)

if [ "$OPTION" == "Install" ]; then
curl -fsSL https://get.jetpack.io/devbox | bash

elif [ "$OPTION" == "Uninstall" ]; then
if [[ -x "/var/usrlocal/bin/devbox" ]]; then
sudo rm -f /var/usrlocal/bin/devbox
Expand Down

0 comments on commit a9e5f86

Please sign in to comment.