feat: add fleek-me-up that also enables flakes

This commit is contained in:
ER 2023-06-29 16:02:55 +03:00 committed by lili
parent 4bac588a55
commit 46ee72fe19
No known key found for this signature in database

View file

@ -4,6 +4,25 @@ nix-me-up:
nix-me-down:
ublue-nix-uninstall
fleek-me-up:
#!/bin/sh
if grep -q "experimental-features = nix-command flakes" ~/.config/nix/nix.conf; then
echo "Flakes enabled, all good!"
else
echo "Fleek requires Nix flakes to be enabled."
read -p "Do you want to automatically enable flakes in ~/.config/nix/nix.conf? (y/n)? " choice
if [[ $choice =~ ^[Yy]$ ]]; then
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
echo "Flakes enabled."
else
echo "Ok, quitting..."
exit 0
fi
fi
echo "Running fleek installer..."
curl -fsSL https://getfleek.dev/installer | bash
devbox:
echo 'Setting phasers to kill. Installing nix.'
ublue-nix-install