Check the machine before installing, and keep old shells' mise working
shellcheck / shellcheck (push) Successful in 11s

install.sh now stops early, with a clear message, if this isn't 64-bit
Arch, it's run as root, there's no internet, or sudo doesn't work.
system/preflight.sh then asks before going on with too little disk space
or / not on btrfs, and offers to switch another login screen to GDM and
PulseAudio to PipeWire. Keeping another login screen puts GDM in
services-off, so install and update stop failing to enable it; a
migration does the same on existing machines. It says nothing when all
is well, as refresh runs install.sh again.

Intel GPUs also get intel-media-driver for hardware video decoding, with
a migration for existing machines.

The mise migration links ~/.local/bin/mise to /usr/bin/mise instead of
deleting it, so shells opened before the update don't print an error at
every prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 08:25:46 -06:00
co-authored by Claude Opus 5.5
parent cb66ce9719
commit a102e6fe0b
8 changed files with 295 additions and 10 deletions
+8 -5
View File
@@ -1,9 +1,10 @@
#!/bin/bash
# mise now comes from pacman, and shell/bashrc activates it, so remove the copy
# mise.run installed in ~/.local/bin and the line it added to ~/.bashrc. Ruby and
# Rails are no longer installed for everyone, only with configure languages:
# machines that have them keep them, and update keeps Rails on new Rubies.
# mise now comes from pacman, and shell/bashrc activates it, so replace the copy
# mise.run installed in ~/.local/bin with a link to it, and remove the line
# mise.run added to ~/.bashrc. Ruby and Rails are no longer installed for
# everyone, only with configure languages: machines that have them keep them,
# and update keeps Rails on new Rubies.
LANGUAGES_CONF="$HOME/.config/coredesktop/languages"
DEFAULT_GEMS="$HOME/.default-gems"
@@ -19,7 +20,9 @@ if [ -f ~/.bashrc ] && grep -qE '\.local/bin/mise activate' ~/.bashrc; then
rm -f "$tmp"
[ $status -eq 0 ] || exit 1
fi
rm -f ~/.local/bin/mise
# A link, not nothing: shells opened before this update still run the old
# copy's path before every prompt, and would print an error until closed
ln -sfn /usr/bin/mise ~/.local/bin/mise || exit 1
# Ruby that CoreDesktop installed: count it as chosen with configure languages.
# From home, so a project's mise.toml in the current directory doesn't count.
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
# Intel GPUs get their video decoding driver (intel-media-driver) too, so
# video and calls don't decode on the CPU
bash "$HOME/.local/share/coredesktop/system/vulkan.sh"
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# update turns on GDM, which fails every time while another login screen is
# on. Keep that one, as install.sh now offers, by marking GDM as turned off.
SERVICES_OFF="$HOME/.config/coredesktop/services-off"
dm="$(readlink /etc/systemd/system/display-manager.service 2> /dev/null)"
dm="$(basename "${dm:-none}")"
[ "$dm" = none ] || [ "$dm" = gdm.service ] && exit 0
grep -qsx "system gdm.service" "$SERVICES_OFF" && exit 0
mkdir -p "$(dirname "$SERVICES_OFF")" || exit 1
echo "system gdm.service" >> "$SERVICES_OFF"
echo "Your login screen is ${dm%.service}, so update no longer tries to turn on GNOME's (GDM)."