move tailscale to own configure step

This commit is contained in:
2026-10-27 05:53:49 -06:00
parent 488b085713
commit 1d2d4dc7f1
4 changed files with 57 additions and 25 deletions
+2 -24
View File
@@ -1,7 +1,7 @@
#!/bin/bash
TITLE="Federated Computer Core"
DESCRIPTION="Superpanel, Tailscale, Nextcloud, email, files and Element"
DESCRIPTION="Superpanel, Nextcloud, email, files and Element"
# What you entered last time, so running this again only does what's missing
CORE_CONF="$HOME/.config/coredesktop/core.conf"
@@ -24,13 +24,6 @@ superpanel_done() {
[ -f "$SUPERPANEL_DESKTOP" ]
}
# Tailscale has no status field naming its login server, so core.conf
# records that it was set up for this Core
tailscale_done() {
[ "$CORE_TAILSCALE" = "$CORE_DOMAIN" ] \
&& tailscale status --json 2> /dev/null | jq -e '.BackendState == "Running"' > /dev/null
}
nextcloud_done() {
"$GOA_ACCOUNT" exists owncloud "$CORE_USER@nextcloud.$CORE_DOMAIN" 2> /dev/null
}
@@ -58,7 +51,7 @@ element_done() {
is_configured() {
[ -n "$CORE_DOMAIN" ] || return 1
core_names
superpanel_done && tailscale_done && nextcloud_done && email_done && files_done && element_done
superpanel_done && nextcloud_done && email_done && files_done && element_done
}
save_conf() {
@@ -67,7 +60,6 @@ save_conf() {
printf 'CORE_DOMAIN=%q\n' "$CORE_DOMAIN"
printf 'CORE_EMAIL=%q\n' "$CORE_EMAIL"
printf 'CORE_NAME=%q\n' "$CORE_NAME"
printf 'CORE_TAILSCALE=%q\n' "$CORE_TAILSCALE"
} > "$CORE_CONF"
}
@@ -100,19 +92,6 @@ setup_superpanel() {
echo "Added Superpanel to your applications."
}
setup_tailscale() {
# --reset and --force-reauth move the machine from any other tailnet;
# --operator lets you, and the Tailscale GNOME extension, use it without sudo
if ! systemctl is-active -q tailscaled; then
sudo systemctl enable --now tailscaled || return 1
fi
echo "Open the link below to sign in to your Core's Tailscale network."
sudo tailscale up --reset --force-reauth --login-server "https://headscale.$CORE_DOMAIN" \
--accept-routes --operator="$USER" || return 1
CORE_TAILSCALE="$CORE_DOMAIN"
save_conf
}
setup_nextcloud() {
[ -n "$APP_PASSWORD" ] || { echo "This needs your Core password, and Nextcloud didn't accept it."; return 1; }
"$GOA_ACCOUNT" add << EOF || return 1
@@ -320,7 +299,6 @@ run_configure() {
echo
step superpanel "Superpanel in your applications"
step tailscale "Tailscale with your Core (headscale.$CORE_DOMAIN)"
step nextcloud "Nextcloud in Online Accounts"
step email "Email in Online Accounts"
step files "Nextcloud files at $MOUNT"