diff --git a/build/ublue-os-just/70-nix.just b/build/ublue-os-just/70-nix.just
index 1faacb78..161e1401 100644
--- a/build/ublue-os-just/70-nix.just
+++ b/build/ublue-os-just/70-nix.just
@@ -1,7 +1,7 @@
# vim: set ft=make :
# Install, uninstall or configure nix
-setup-nix:
+setup-nix ARG="prompt":
#!/usr/bin/env bash
CURRENT_STATE="Not Installed"
if [ -f "/etc/systemd/system/nix-daemon.socket" ]; then
@@ -9,38 +9,52 @@ setup-nix:
fi
bold=$(tput bold)
normal=$(tput sgr0)
- echo "Nix is currently: ${bold}${CURRENT_STATE}${normal}"
- echo 'What would you like to do with Nix?'
- OPTION=$(ugum choose \
- Install \
- Uninstall \
- "Update nix user profile" \
- "Update all nix profiles" \
- "Re-copy nix systemd units to system" \
- "Add nix path to sudo" \
- "Remove nix path from sudo" \
- )
- if [ "$OPTION" == "Install" ]; then
+ OPTION={{ ARG }}
+ if [ "$OPTION" == "prompt" ]; then
+ echo "Nix is currently: ${bold}${CURRENT_STATE}${normal}"
+ echo 'What would you like to do with Nix?'
+ OPTION=$(ugum choose \
+ Install \
+ Uninstall \
+ "Update nix user profile" \
+ "Update all nix profiles" \
+ "Re-copy nix systemd units to system" \
+ "Add nix path to sudo" \
+ "Remove nix path from sudo" \
+ )
+ elif [ "$OPTION" == "help" ]; then
+ echo "Usage: ujust setup-nix