updated branding and some retooling

This commit is contained in:
2026-03-29 07:13:22 -05:00
parent bea98d56b8
commit 33e3db9998
6 changed files with 66 additions and 106 deletions

View File

@@ -14,7 +14,25 @@ human_size() {
numfmt --to=iec --suffix=B "$1"
}
zenity --info --window-icon="$LOGO" --text="Sovran SystemsOS Installer\n\nWARNING:\nThis installer will ERASE ALL DATA on selected disks.\n\nPress OK to continue."
# ── 1. WELCOME & ROLE SELECTION ──────────────────────────────────────────
ROLE=$(zenity --list --radiolist \
--window-icon="$LOGO" \
--width=1000 --height=400 \
--title="Welcome to Sovran SystemsOS" \
--text="<span font='36' weight='heavy'>Sovran Systems</span>\n<span font='16' style='italic' foreground='#aaaaaa'>Be Digitally Sovereign</span>\n\nPlease select your preferred installation type:" \
--print-column=3 \
--column="Select" --column="Logo" --column="Role" --column="Description" \
TRUE "🖥️" "Server+Desktop" "Gives you the full Sovereign Experience. A beautiful, easy-to-use, powerful daily driver desktop computer plus your very own cloud, website, secure messaging, video calling, password manager, and full Bitcoin node with Bitcoin Lightning and non-KYC buying and selling." \
FALSE "💻" "Desktop Only" "The same beautiful, easy-to-use desktop experience, but just the desktop without the background server applications." \
FALSE "₿" "Node (Bitcoin-only)" "Full Bitcoin node with Bitcoin Lightning and non-KYC buying and selling." || true)
if [ -z "$ROLE" ]; then
zenity --error --window-icon="$LOGO" --text="Installation cancelled."
exit 1
fi
# ── 2. FETCH DISKS ───────────────────────────────────────────────────────
# Filter out USB drives and loop/cdrom devices so it doesn't try to install to the installation media
mapfile -t DISKS < <(lsblk -b -dno NAME,SIZE,TYPE,RO,TRAN -e 7,11 | awk '$3=="disk" && $4=="0" && $5!="usb" {print $1":"$2}')
@@ -52,18 +70,6 @@ else
SUMMARY="${SUMMARY}\nData disk: none"
fi
ROLE=$(zenity --list --radiolist \
--window-icon="$LOGO" \
--title="Choose Install Role" \
--column="" --column="Role" \
TRUE "Server-Desktop (default)" \
FALSE "Desktop" \
FALSE "Node (Bitcoin-only)" || true)
if [ -z "$ROLE" ]; then
ROLE="Server-Desktop (default)"
fi
CONFIRM=$(zenity --entry --window-icon="$LOGO" --text="WARNING: This will ERASE ALL DATA on:\n\n${SUMMARY}\n\nType ERASE to continue.")
if [ "$CONFIRM" != "ERASE" ]; then
zenity --error --window-icon="$LOGO" --text="Install cancelled."
@@ -87,18 +93,34 @@ rm -rf /mnt/etc/nixos/*
cp -a /etc/sovran/flake/* /mnt/etc/nixos/
cp /tmp/hardware-configuration.nix /mnt/etc/nixos/hardware-configuration.nix
cat > /mnt/etc/nixos/custom.nix <<EOF
# ── 3. APPLY ROLE STATE & TEMPLATE ───────────────────────────────────────
IS_SERVER="false"
IS_DESKTOP="false"
IS_NODE="false"
case "$ROLE" in
"Server+Desktop") IS_SERVER="true" ;;
"Desktop Only") IS_DESKTOP="true" ;;
"Node (Bitcoin-only)") IS_NODE="true" ;;
esac
cat > /mnt/etc/nixos/role-state.nix <<EOF
# THIS FILE IS AUTO-GENERATED BY THE INSTALLER. DO NOT EDIT.
# To change your role later, edit custom.nix instead.
{ config, lib, ... }:
{
sovran_systemsOS.roles.server-desktop = ${ROLE == "Server-Desktop (default)"};
sovran_systemsOS.roles.desktop = ${ROLE == "Desktop"};
sovran_systemsOS.roles.node = ${ROLE == "Node (Bitcoin-only)"};
sovran_systemsOS.roles.server_plus_desktop = lib.mkDefault ${IS_SERVER};
sovran_systemsOS.roles.desktop = lib.mkDefault ${IS_DESKTOP};
sovran_systemsOS.roles.node = lib.mkDefault ${IS_NODE};
}
EOF
nixos-install --root /mnt --flake /mnt/etc/nixos#nixos
# Copy the pristine custom.template.nix for the user to edit
cp /mnt/etc/nixos/custom.template.nix /mnt/etc/nixos/custom.nix
EOF
# ── 4. FINAL INSTALL & REBOOT ────────────────────────────────────────────
nixos-install --root /mnt --flake /mnt/etc/nixos#nixos