[ubuntu] Niri!
This commit is contained in:
+39
-4
@@ -50,6 +50,35 @@ step_repos() {
|
||||
fi
|
||||
info "tailscale repo present"
|
||||
|
||||
# Dux Labs PPA, for niri: https://duxlabs.dev/docs/repo
|
||||
# The pin has to be in place before the first apt-get update.
|
||||
local pin=apt/preferences.d/duxlabs-dux-repo
|
||||
if ! sudo cmp -s "$HERE/etc/$pin" "/etc/$pin"; then
|
||||
sudo install -D -m 0644 -o root -g root "$HERE/etc/$pin" "/etc/$pin"
|
||||
changed=1
|
||||
fi
|
||||
if ! compgen -G "/etc/apt/sources.list.d/duxlabs-ubuntu-dux-repo-*" >/dev/null; then
|
||||
sudo add-apt-repository -y -n ppa:duxlabs/dux-repo
|
||||
changed=1
|
||||
fi
|
||||
info "dux labs ppa present (pinned to niri, xwayland-satellite)"
|
||||
|
||||
# Noctalia: https://docs.noctalia.dev/noctalia/getting-started/installation/#debian
|
||||
# The keyring is a package in the repo, so apt keeps it current.
|
||||
if [ ! -f /usr/share/keyrings/nickh-archive-keyring.gpg ]; then
|
||||
local tmp
|
||||
tmp="$(mktemp -d)"
|
||||
curl -fsSL -o "$tmp/nickh-archive-keyring.deb" https://pkg.noctalia.dev/deb/nickh-archive-keyring.deb
|
||||
sudo dpkg -i "$tmp/nickh-archive-keyring.deb"
|
||||
rm -rf "$tmp"
|
||||
fi
|
||||
if [ ! -f "/etc/apt/sources.list.d/noctalia-${codename}.sources" ]; then
|
||||
curl -fsSL "https://pkg.noctalia.dev/deb/noctalia-${codename}.sources" \
|
||||
| sudo tee "/etc/apt/sources.list.d/noctalia-${codename}.sources" >/dev/null
|
||||
changed=1
|
||||
fi
|
||||
info "noctalia repo present"
|
||||
|
||||
if [ "$changed" = 1 ]; then sudo apt-get update; fi
|
||||
}
|
||||
|
||||
@@ -99,6 +128,8 @@ step_etc() {
|
||||
if systemctl is-active -q keyd.service; then sudo systemctl restart keyd.service && info "restarted keyd"; fi ;;
|
||||
logid.cfg)
|
||||
if systemctl is-active -q logid.service; then sudo systemctl restart logid.service && info "restarted logid"; fi ;;
|
||||
systemd/logind.conf.d/*)
|
||||
sudo systemctl reload systemd-logind.service && info "reloaded logind" ;;
|
||||
udev/rules.d/*)
|
||||
sudo udevadm control --reload-rules && sudo udevadm trigger --action=change && info "reloaded udev rules" ;;
|
||||
esac
|
||||
@@ -119,10 +150,14 @@ step_services() {
|
||||
info "running $unit"
|
||||
done
|
||||
|
||||
if getent group docker >/dev/null && ! id -nG "$USER" | grep -qw docker; then
|
||||
sudo usermod -aG docker "$USER"
|
||||
info "added $USER to docker group (log out/in to apply)"
|
||||
fi
|
||||
# dialout: serial ports (ttyUSB/ttyACM).
|
||||
local group
|
||||
for group in docker dialout; do
|
||||
if getent group "$group" >/dev/null && ! id -nG "$USER" | grep -qw "$group"; then
|
||||
sudo usermod -aG "$group" "$USER"
|
||||
info "added $USER to $group group (log out/in to apply)"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
step_shell() {
|
||||
|
||||
Reference in New Issue
Block a user