Compare commits

3 Commits

Author SHA1 Message Date
Raphaël Numbus 6982a24dfd Added a bootstrap script 2026-05-15 10:47:26 +02:00
Raphaël Numbus 5f480bb12d Merge branch 'testing' into production 2026-05-15 10:46:58 +02:00
Raphaël Numbus a45dabe28e Edit ignored files. 2026-05-15 10:08:24 +02:00
3 changed files with 54 additions and 3 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
config/
web/ux/
/config/
/web/ux/
test*
.DS_Store
.env
+1 -1
View File
@@ -1,5 +1,5 @@
/config/
web/ux/
/web/ux/
test*
.DS_Store
.env
+51
View File
@@ -0,0 +1,51 @@
#!/usr/bin/env bash
set -euo pipefail
# Numbus Installer Bootstrap
# This script clones the repository and launches the NixOS deployment script.
REPO_URL="https://gittea.dev/numbus/numbus.git"
INSTALL_DIR="/tmp/numbus-installer"
echo "\n ☁️ Initializing Numbus Installer..."
# 1. Check for Nix
TEST_FAIL=0
if [[ -r /etc/os-release ]] && grep -qi '^ID=nixos\b' /etc/os-release; then
echo -e "\n ✅ NixOS system detected."
else
TEST_FAIL=$((TEST_FAIL + 1))
echo -e "\n ❌ You are not on a NixOS based system. This is required to continue."
fi
if [[ "$(uname -m)" == "x86_64" ]]; then
echo -e "\n ✅ x86_64 system detected."
else
TEST_FAIL=$((TEST_FAIL + 1))
echo -e "\n ❌ You are not on a x86_64 based system. This is required to continue."
fi
if [[ ${TEST_FAIL} -gt 0 ]]; then
COMPATIBILITY_OVERRIDE=$(gum choose --header "Some compatibility checks failed. The installation will VERY LIKELY fail. Continue ?" \
"No" \
"Yes, I know what I am doing")
[[ "${COMPATIBILITY_OVERRIDE}" == "No" ]] && exit 1
echo -e "\n ⚠️ Continuing anyways, this is not supported by Numbus."
fi
# 2. Clone/Update the repository
if [[ -e ${INSTALL_DIR}/config/* ]]; then
echo " ⚠️ It seems you have already run this script. Previously generated files need to be cleaned up."
OLD_CONFIG_PATH="${INSTALL_DIR}/trash/$(date +"%Y-%m-%d-%Hh%M")"
mkdir -p ${OLD_CONFIG_PATH}
mv ${INSTALL_DIR} ${OLD_CONFIG_PATH}
echo " ✅ Your files have been moved to the ${OLD_CONFIG_PATH} directory. You can retrieve them there if needed."
fi
git clone "${REPO_URL}" "${INSTALL_DIR}" -q
# 3. Launch the deployment script
cd "${INSTALL_DIR}/script"
chmod +x deploy.sh
./deploy.sh