Set up Pop!_OS for a Federated Core, like CoreDesktop's configure

A port of CoreDesktop's configure to Pop!_OS 24.04 with COSMIC, in the shape
of connector-macos: its own install.sh, update and configure, installed in
~/.local/share/federated-connector/connector.

Every configure item is ported: the Core (email, calendars and contacts
through GNOME Online Accounts and Evolution, as COSMIC has no accounts of its
own; Superpanel; files over davfs2; Element; Tally; the email watcher),
Tailscale, backups, AI agents in the sandbox and their sign-ins, languages
with mise, AI servers, printers, network storage and the agent sandbox.
Folders go in the COSMIC Files sidebar. Each item installs what it needs
from apt, Flathub or the tool's own apt repository when you set it up.

smoketest/run checks it in Ubuntu 24.04 containers with Docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 14:20:47 -07:00
co-authored by Claude Opus 5.5
commit bc07e1d3e3
60 changed files with 5626 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
#!/bin/bash
#
# Purpose : Install what an item needs from Pop!_OS' and Ubuntu's apt
# repositories, and from Flathub. Source this file; it uses
# confirm_yes from configure.
#
# Pop!_OS comes with less than CoreDesktop installs up front, so each item
# installs what it needs the first time you set it up, after asking.
is_pop() {
[ "$(. /etc/os-release 2> /dev/null && echo "$ID")" = pop ]
}
os_name() {
(. /etc/os-release 2> /dev/null && echo "${PRETTY_NAME:-$ID}") || uname -s
}
# True if every package named is installed
pkg_installed() {
local pkg
for pkg in "$@"; do
[ "$(dpkg-query -W -f '${db:Status-Status}' "$pkg" 2> /dev/null)" = installed ] || return 1
done
}
# pkg_ensure <what they're for> <package>...: offer to install the packages
# that are missing. Fails if any is still missing.
pkg_ensure() {
local why="$1" pkg missing=()
shift
for pkg in "$@"; do
pkg_installed "$pkg" || missing+=("$pkg")
done
[ ${#missing[@]} -eq 0 ] && return 0
echo "$why needs: ${missing[*]}"
confirm_yes "Install them now (with apt; asks for your password)?" || return 1
pkg_install "${missing[@]}"
}
# Install packages without asking. apt's lists may be old on a new install,
# so they're refreshed once per run if the install fails.
pkg_install() {
sudo apt-get install -y "$@" && return 0
[ -n "$PKG_UPDATED" ] && return 1
PKG_UPDATED=1
sudo apt-get update && sudo apt-get install -y "$@"
}
# Flatpak apps come from Flathub, as in the COSMIC Store
flatpak_installed() {
flatpak info "$1" &> /dev/null
}
# flatpak_ensure <app id> <name> <what it's for>
flatpak_ensure() {
flatpak_installed "$1" && return 0
echo "$2 isn't installed. $3"
confirm_yes "Install $2 from Flathub?" || return 1
flatpak install -y --noninteractive flathub "$1"
}