Add upgrade safeguards, hardware setup, sign-in options and Taildrop from Omarchy
shellcheck / shellcheck (push) Failing after 19s

Adapted from Omarchy (github.com/omacom/omarchy) for Arch with GNOME:

- A pacman hook stops a full upgrade run without update (pacman -Syu,
  yay -Syu), which would skip the snapshot and update's checks. update
  and install.sh set COREDESKTOP_ALLOW_PACMAN=1, which the hook finds on
  pacman or any process above it; you can set it too.
- When the Arch upgrade stops on files no package owns, update lists
  them and asks to move them to /var/lib/coredesktop/replaced and try
  again, putting back what the retry didn't replace. When packages
  conflict, it runs pacman again so you can choose.
- update and install keep the computer from sleeping until they finish.
- system/hardware.sh (install, and a migration): the Wi-Fi country from
  the time zone, thermald and intel-lpmd on Intel laptops, and Wi-Fi 6
  on Intel BE200/BE211 cards, whose driver gets Wi-Fi 7 wrong.
- configure security-key and configure fingerprint: touch a FIDO2 key
  or a finger instead of typing your password for sudo and polkit,
  falling back to the password. Each shows only when the hardware is
  there. The fingerprint skips to the password with the lid shut.
- webapp: put a website in the app grid as its own app window.
- Taildrop: Files' Scripts > Send with Tailscale, and a user service
  that saves files sent here to Downloads, started when configure
  tailscale joins.
- A NetworkManager dispatcher script pauses a Tailscale exit node while
  you sign in to a captive portal, and resumes it once online.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-16 12:08:06 -07:00
co-authored by Claude Opus 5.5
parent 5d7db2cdc8
commit 9dc5eb193d
32 changed files with 1809 additions and 9 deletions
+33 -3
View File
@@ -157,6 +157,14 @@ sudo umount /mnt
The installer adds the Vulkan driver for Intel and AMD GPUs, and Intel's video decoding driver, so videos and calls don't decode on the CPU (AMD's comes with Mesa). If there's an NVIDIA GPU and archinstall's proprietary driver wasn't chosen, it installs NVIDIA's driver: the open kernel modules for GTX 16xx / RTX 20xx and newer, or the 580xx legacy driver for older cards back to the GTX 900 series. Reboot afterwards.
### Hardware
These take effect after a reboot:
- **Wi-Fi country.** Wi-Fi uses only the channels and power allowed everywhere until it knows which country it's in. The installer adds the regulatory database (wireless-regdb) and sets the country from your time zone, in /etc/conf.d/wireless-regdom. If you set one there already, it's left alone; to change it, edit that file.
- **Intel laptops** get thermald (Sandy Bridge and newer), which keeps them cool before the firmware has to slow the CPU right down, and intel-lpmd (Alder Lake, Raptor Lake, Meteor Lake, Lunar Lake and Panther Lake), which moves background work onto the low-power cores to save battery.
- **Intel BE200 and BE211 Wi-Fi 7 cards** use Wi-Fi 6: their driver drops to its slowest rate on Wi-Fi 7 with some access points (seen on Dell XPS 14 and 16 laptops). To try Wi-Fi 7, delete /etc/modprobe.d/iwlwifi-disable-eht.conf and reboot.
### System defaults
- SSH connections notice a dropped link within a minute instead of hanging (override per host in ~/.ssh/config).
@@ -164,6 +172,8 @@ The installer adds the Vulkan driver for Intel and AMD GPUs, and Intel's video d
- Shutdown waits at most 10 seconds for a service that won't stop, instead of 90.
- If memory runs out, systemd-oomd closes the app causing it instead of the whole desktop freezing.
- Boot no longer waits for the network.
- A full upgrade run with pacman alone (`sudo pacman -Syu`, or `yay` with no arguments) stops before it changes anything and tells you to run `update`, which takes a snapshot first and does the checks that pacman alone skips (see "Keep your System Up-to-date"). Installing and removing packages work as before. To upgrade with pacman anyway, run `COREDESKTOP_ALLOW_PACMAN=1 sudo pacman -Syu`.
- If you use a Tailscale exit node, it's turned off while you sign in on a network with a sign-in page (hotels, airports, trains), whose page the exit node would otherwise block, and turned back on once you're online.
- Commands run over SSH (`ssh {machine} {command}`) can find tools in ~/.local/bin and mise.
- You log in to this machine over SSH with a key, not a password, so nobody on the same network can try to guess your password. Put your public key in ~/.ssh/authorized_keys on this machine (`ssh-copy-id` does this from the other machine). To allow passwords again, delete /etc/ssh/sshd_config.d/10-coredesktop-keys-only.conf and run `sudo systemctl reload sshd`. Machines installed earlier, where someone has logged in over SSH with a password, keep accepting passwords until you run `bash ~/.local/share/coredesktop/system/sshd.sh`.
- ssh uses Bitwarden's SSH agent while Bitwarden is running it (turn it on in Bitwarden's settings), and GNOME's otherwise. A terminal opened before Bitwarden started uses GNOME's; open a new one.
@@ -174,6 +184,7 @@ The installer adds the Vulkan driver for Intel and AMD GPUs, and Intel's video d
Besides installing software, CoreDesktop changes these settings. They're listed so you know what you're running, and so you can undo them (see "Uninstalling").
- **/etc/pacman.conf**: adds the `[federated]` repository and trusts its signing key (see Pacman above).
- **pacman hook**: /etc/pacman.d/hooks/00-coredesktop-guard.hook runs /usr/local/lib/coredesktop/pacman-guard, which stops full upgrades run without `update` (see System defaults). Delete the hook to turn it off.
- **Mirrors**: reflector rewrites /etc/pacman.d/mirrorlist once a week with fast HTTPS mirrors that synced with Arch in the last 12 hours, using /etc/xdg/reflector/reflector.conf. To choose your own mirrors, delete that file's first (CoreDesktop) line and edit the rest; to stop CoreDesktop changing your mirrors at all, add `reflector` to ~/.config/coredesktop/skip-packages.
- **SSH**: sshd is on, with key login only (/etc/ssh/sshd_config.d/10-coredesktop-keys-only.conf). The SSH client keepalives are in /etc/ssh/ssh_config.d/20-coredesktop-keepalive.conf.
- **Firewall**: ufw is on, with the rules under Firewall above, and ufw-docker's rules in /etc/ufw/after.rules.
@@ -181,12 +192,14 @@ Besides installing software, CoreDesktop changes these settings. They're listed
- **systemd**: a 10-second stop timeout (/etc/systemd/system.conf.d/ and /etc/systemd/user.conf.d/10-coredesktop-timeout.conf), systemd-oomd for apps (/etc/systemd/user/app.slice.d/10-coredesktop-oomd.conf), and NetworkManager-wait-online is masked.
- **/etc/security/pam_env.conf**: a PATH line, so SSH commands find ~/.local/bin and mise.
- **mDNS**: Avahi is on, nss-mdns is added to /etc/nsswitch.conf, and SSH is advertised in /etc/avahi/services/ssh.service.
- **Captive portals**: /etc/NetworkManager/dispatcher.d/90-coredesktop-captive-portal pauses a Tailscale exit node at a sign-in page (see System defaults), and NetworkManager-dispatcher is turned on to run it.
- **Hardware** (see Hardware above): the Wi-Fi country in /etc/conf.d/wireless-regdom, thermald and intel-lpmd on Intel laptops, and /etc/modprobe.d/iwlwifi-disable-eht.conf on Intel BE200 and BE211 cards.
- **Wi-Fi**: if iwd is turned on alongside NetworkManager (archinstall's "Copy ISO network configuration" does that), iwd and systemd-networkd are turned off, so that NetworkManager runs the network from the next restart. Choose your Wi-Fi network once in GNOME's top-right menu after that restart. If you set NetworkManager to use iwd itself (`wifi.backend=iwd`), this leaves iwd alone.
- **Services turned on**: Avahi, Bluetooth, CUPS (printing), fwupd, GDM, NetworkManager, reflector (weekly), sshd, Docker, Tailscale, ufw and systemd-oomd. Your user is added to the docker group.
- **Snapper** (btrfs only): a config for / in /etc/snapper/configs/root.
- **NVIDIA** (only if it installs the driver): /etc/mkinitcpio.conf.d/nvidia.conf and NVIDIA's suspend services.
- **Your home folder**: lines in ~/.bashrc (CoreDesktop's shell setup, ~/.local/bin on PATH, the Bitwarden SSH agent), the commands in ~/.local/bin (update, refresh, sibling, version, configure, audit, report), GNOME extensions and their settings, Claude Code's ~/.claude/settings.json if you had none, a user timer that checks for updates, and a user service that pauses your Core's email if its password stops working (see Configure).
- **configure** adds more, only for what you set up: your Nextcloud files mount and network storage in /etc/fstab (SMB passwords in /etc/coredesktop/smb, SFTP mounts as user services named coredesktop-sftp-*), printers in CUPS, GNOME Online Accounts, passwords in your GNOME keyring, and the backup timer.
- **Your home folder**: lines in ~/.bashrc (CoreDesktop's shell setup, ~/.local/bin on PATH, the Bitwarden SSH agent), the commands in ~/.local/bin (update, refresh, sibling, version, configure, audit, report, webapp), GNOME extensions and their settings, Claude Code's ~/.claude/settings.json if you had none, a user timer that checks for updates, a user service that pauses your Core's email if its password stops working (see Configure), and Taildrop's user service and "Send with Tailscale" in ~/.local/share/nautilus/scripts (see Configure).
- **configure** adds more, only for what you set up: your Nextcloud files mount and network storage in /etc/fstab (SMB passwords in /etc/coredesktop/smb, SFTP mounts as user services named coredesktop-sftp-*), printers in CUPS, GNOME Online Accounts, passwords in your GNOME keyring, the backup timer, and for a security key or fingerprint, lines in /etc/pam.d/sudo and /etc/pam.d/polkit-1 (a copy of /usr/lib/pam.d/polkit-1), with security keys in /etc/u2f_mappings and the lid check in /usr/local/lib/coredesktop/lid-closed.
## Keep your System Up-to-date
@@ -201,9 +214,11 @@ update
The script pulls the latest CoreDesktop, then runs each step in ~/.local/share/coredesktop/updates.d/ in order. Among other things it:
- stops if there's less than 10 GiB free on / (run `UPDATE_FORCE=1 update` to skip the check)
- keeps the computer from going to sleep until it's done, even if you close the lid, since an upgrade cut off part way can leave it unable to start
- snapshots / first, if Snapper is set up (see Snapshots above)
- switches to up-to-date mirrors first if yours is more than a day behind Arch, as it would otherwise miss new packages without saying so
- updates the Arch keyring, then Arch and GNOME, then AUR packages, Flatpaks, the languages you installed with mise, the pipx apps CoreDesktop installs, GNOME extensions and firmware
- if the Arch upgrade stops because files no package owns are where a package now installs its own (left by `pip`, `make install` or an old installer), lists them and asks whether to move them to /var/lib/coredesktop/replaced and try again. If the second try fails too, it puts them back. If two packages conflict and pacman needs you to choose which to keep, it runs pacman again so you can answer
- warns you not to reboot if the initramfs failed to rebuild
- runs any one-time migrations, the way existing machines pick up new CoreDesktop setup
- lists packages that were installed only because something else needed them, and are no longer needed by anything, and asks before removing them. Packages CoreDesktop installs are never on this list. To keep one you use directly off the list, run `sudo pacman -D --asexplicit <package>`
@@ -274,7 +289,7 @@ configure
It covers:
- **Your Federated Core.** Give it your Superpanel's address (e.g. https://superpanel.example.com), your Core email, name and password, and it adds Superpanel to your applications, adds your Nextcloud (calendar, contacts and files) and email to GNOME's Online Accounts, and mounts your Nextcloud files at /mnt/example.com ("example.com" in the Files sidebar), and points Element at your Core's Matrix server. For Nextcloud and the files it creates a Nextcloud app password, which you can revoke in Nextcloud under Settings > Security. You can add more Cores: run `configure core` again and choose "Add a Core". Each gets its own Superpanel, Nextcloud, email and files; Element, Tailscale and backups use your main Core (the first one, unless you choose another). "Remove a Core" takes it off this computer and revokes its app password, and leaves everything on the Core itself as it is. If you change your Core password (e.g. in Superpanel), run `configure core` and choose "Your Core password changed": email keeps your Core password, so it saves the new one there, and it signs in to Nextcloud with it, which turns the app passwords for Nextcloud, files and backups back on (Nextcloud turns them off when your password changes), then checks each of them. To check that a Core still works from this computer, run `configure core` and choose "Test a Core": it signs in to Superpanel, Nextcloud, email, your files, Element's Matrix server and backups the way this computer does, says which work, and offers to fix those that don't (asking for your Core password if a fix needs it, e.g. to make a new app password for one that was revoked), then tests again.
- **Your Core's Tailscale network.** Joins this computer to it through headscale.example.com, so you can reach your other machines on it. Set up your Core first. You sign in through a link it shows you; if this computer is on another Tailscale network, it moves it to your Core's. To leave your Core's network, run `configure tailscale` again.
- **Your Core's Tailscale network.** Joins this computer to it through headscale.example.com, so you can reach your other machines on it. Set up your Core first. You sign in through a link it shows you; if this computer is on another Tailscale network, it moves it to your Core's. To leave your Core's network, run `configure tailscale` again. Once you've joined, you can send files to your other computers on it with Taildrop: select them in Files, right-click and choose Scripts > Send with Tailscale. Files sent to this computer go to your Downloads folder, with a notification.
- **Daily backups of your home folder** to your Nextcloud files, in a .backup-{machine name} folder, with restic. Set up your Core first. The backup is encrypted with a passphrase that `configure` shows you once: save it somewhere other than this computer, such as Bitwarden. It keeps 7 daily, 4 weekly and 6 monthly backups, and leaves out caches, things that can be reinstalled, and WinBoat's Windows VM (~/winboat). To leave out more, list paths in ~/.config/coredesktop/backup-exclude, one per line. restic reaches Nextcloud directly through rclone with its own Nextcloud app password, so the backup doesn't depend on the /mnt mount. See "Restoring from a backup" below. To turn backups off, run `configure backup` again; it also offers to delete the backups from your Nextcloud files (they go to Nextcloud's trash bin).
- **Tally for Plausible**, if your main Core runs Plausible Analytics: it's pointed at plausible.example.com.
- Signing in to Claude Code, opencode and Hermes Agent and choosing their model providers.
@@ -283,9 +298,24 @@ It covers:
- **Network storage**: shared folders from other machines on your network, mounted in /mnt and added to the Files sidebar. It finds SMB servers (Windows, Samba and NAS boxes, and Macs with File Sharing on) and machines you can ssh to, or you enter an address (`smb://nas.local/files`, `sftp://me@server.local/srv/data`). An SMB share is in /etc/fstab and mounts the first time you open its folder, so a server that's off doesn't hold anything up; its password is kept in /etc/coredesktop/smb, readable only by root. An SFTP folder is mounted by sshfs as you, at login, with the SSH keys in your Bitwarden or GNOME SSH agent, so the server has to accept one of them (it can't ask for a password). Agents in the sandbox can read these folders, and change one only if you start the agent in it. "Remove one" unmounts it and takes it back out.
- **Agent sandbox**, if WinBoat is set up: the sandbox hides WinBoat's settings (~/.winboat) from agents, since they include your Windows password. To let agents read them, e.g. to have one help with WinBoat, run `configure sandbox` and switch it; switch it again to hide them. This only covers the sandboxed agents (opencode, Hermes, Cline), not Claude Code's own sandbox. Your SSH keys, password stores and the rest stay hidden either way.
- **AI servers** on your network, such as Ollama on a Mac. It finds the machines on your network over mDNS and asks each one on the ports LLM servers use (11434 Ollama, 1234 LM Studio, 8080 llama.cpp, 8000 vLLM), since LLM servers don't announce themselves; or you enter a server's address. For the server you choose, it lets the sandboxed agents reach it (that port only), adds it to opencode with its models, offers to make it Hermes' model, and lets the commands Claude Code runs reach it too. Claude Code itself keeps using Anthropic's models. A server has to accept connections from other machines: in Ollama's settings, turn on "Expose Ollama to the network"; in LM Studio, "Serve on Local Network". "Remove a server" takes it back out of all of them.
- **Security key**, if one is plugged in: a FIDO2 key (YubiKey, Nitrokey, SoloKey, ...) to touch instead of typing your password for sudo and the password prompts of GNOME's apps and settings. Without the key, they ask for your password as before. Run it again to add a spare key, or to stop using keys.
- **Fingerprint**, if this computer has a fingerprint reader: the same, with your fingerprint. It enrolls your right index finger, unless you've already enrolled one in Settings > System > Users. The login and lock screens take it too. With the laptop's lid shut, it goes straight to your password. Run it again to stop.
To set up one thing, name it, e.g. `configure hermes`; `configure --list` shows the names.
## Web apps
`webapp` puts a website in GNOME's app grid as an app of its own. It opens in its own window, without tabs or an address bar, and has its own icon in the dock:
```
webapp add "Nextcloud" https://nextcloud.example.com
webapp add "Kanban" https://kanban.example.com https://kanban.example.com/logo.png
webapp list
webapp remove "Nextcloud"
```
The icon is an image's address or file. Without one, it uses the site's own icon if it has one, or a plain icon. Web apps open in your default browser if it's based on Chromium (Helium is), and otherwise in Helium or another Chromium-based browser that's installed.
### When your Core password changes
Your email in Online Accounts keeps your Core password, so after you change it (e.g. in Superpanel), the mail server starts refusing the old one. GNOME tries it again each time your network changes, and Evolution each time it fetches mail, and after a few wrong passwords the mail server blocks this computer for a while.