#!/usr/bin/env nix-shell #!nix-shell -i bash -p gum fastfetch xkcdpass sops ssh-to-age age sshpass envsubst pciutils usbutils mosquitto networking() { SELECTED_SUBACTION=$(gum choose --header "Choose a setting to change:" "${NETWORKING_SETTINGS_LIST[@]}") if [[ "$SELECTED_SUBACTION" = " 🏠 Change the home router subnet" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 🌐 Change the home router IP address" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 🖥️ Change the server's IP address" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 🌍 Change the domain name" ]]; then echo "Some future logic here" else echo -e "\n\n ❌ Unexpected bug. Please contact the developer. Aborting." exit 1 fi } backup() { SELECTED_SUBACTION=$(gum choose --header "Choose a setting to change:" "${BACKUP_SETTINGS_LIST[@]}") if [[ "$SELECTED_SUBACTION" = " 🕣 Change the backup time" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 💾 Backup all data to a ssh remote" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 💿 Backup all data to a local folder" ]]; then echo "Some future logic here" else echo -e "\n\n ❌ Unexpected bug. Please contact the developer. Aborting." exit 1 fi } services() { echo "Some future logic here" } devices() { echo "Some future logic here" } disks() { SELECTED_SUBACTION=$(gum choose --header "Choose a setting to change:" "${DISKS_SETTINGS_LIST[@]}") if [[ "$SELECTED_SUBACTION" = " ➕ Add or remove a boot disk" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " ➕ Add or remove data disk(s)" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 🔄 Replace a boot disk" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 🔄 Replace a data disk" ]]; then echo "Some future logic here" else echo -e "\n\n ❌ Unexpected bug. Please contact the developer. Aborting." exit 1 fi } health() { SELECTED_SUBACTION=$(gum choose --header "Choose a setting to change:" "${SERVER_HEALTH_SETTINGS_LIST[@]}") if [[ "$SELECTED_SUBACTION" = " 🩺 Check disk(s) health" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " ⛑️ Check service(s) health" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 🌐 Check connectivity" ]]; then echo "Some future logic here" else echo -e "\n\n ❌ Unexpected bug. Please contact the developer. Aborting." exit 1 fi } email() { SELECTED_SUBACTION=$(gum choose --header "Choose a setting to change:" "${EMAIL_SETTINGS_LIST[@]}") if [[ "$SELECTED_SUBACTION" = " ⚙️ Change the server's email SMTP settings" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 📧 Change your personal email" ]]; then echo "Some future logic here" else echo -e "\n\n ❌ Unexpected bug. Please contact the developer. Aborting." exit 1 fi } passwords() { SELECTED_SUBACTION=$(gum choose --header "Choose a setting to change:" "${PASSWORD_SETTINGS_LIST[@]}") if [[ "$SELECTED_SUBACTION" = " 👁️ Display the server's configuration credentials" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 🔧 Change the numbus-admin's password" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " 🔑 Add or remove SSH keys" ]]; then echo "Some future logic here" elif [[ "$SELECTED_SUBACTION" = " ⚙️ Change Cloudflare API token" ]]; then echo "Some future logic here" else echo -e "\n\n ❌ Unexpected bug. Please contact the developer. Aborting." exit 1 fi } configuration_export() { echo "Some future logic here" } ### --> Main logic set -euo pipefail fastfetch --logo nixos --structure '' cat <