aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/systemd/user
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-14 10:58:37 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-14 10:58:37 +0100
commit3fc4705b6c711871a920290feef138694e72d29a (patch)
tree8e2dfddb3d930fda7c4a8972a1086782b7daad17 /dot_config/systemd/user
parent726005786ab398e89673bf8c141e50645f676c57 (diff)
downloaddotfiles-3fc4705b6c711871a920290feef138694e72d29a.tar.gz
dotfiles-3fc4705b6c711871a920290feef138694e72d29a.tar.bz2
dotfiles-3fc4705b6c711871a920290feef138694e72d29a.zip
feat: teams autostart, llama-cpp-vulkan ignore, snxctl-chromium wrapper
systemd/user/teams-{sii,xsight}.service: autostart both Teams flatpak profiles on sway-session.target login. KillMode=mixed so SIGTERM hits only the wrapper process — both instances share the same flatpak app id, so killing by app id would take down the sibling instance. A 15s SIGKILL fallback covers the case where Electron tray-hides instead of quitting. Both units listed in systemd-units/user.txt. etc/pacman.conf: IgnorePkg = llama-cpp-vulkan. The AUR package rebuilds on every llama.cpp commit (multi-hour build). Update manually with `paru -S llama-cpp-vulkan` when intended. snxctl-chromium wrapper: - dot_local/share/snx-rs/bin/xdg-open: shim that flatpak-runs ungoogled-chromium, used only by snx-rs. - dot_config/systemd/user/snx-rs.service.d/10-chromium-saml.conf: drop-in prepending that dir to the daemon's PATH so snx-rs's opener-crate call to xdg-open lands in chromium, without affecting xdg-open for any other process. - dot_local/bin/snxctl-chromium: convenience wrapper that daemon-reloads and restarts snx-rs.service if the drop-in isn't yet applied, then execs `snxctl connect`. firefox/user-overrides.js: revert the dom.security.https_only_mode. upgrade_local and network.lna.local-network-to-localhost.skip-checks prefs — they didn't actually fix the SAML flow. Replaced with a comment pointing to the wrapper instead.
Diffstat (limited to 'dot_config/systemd/user')
-rw-r--r--dot_config/systemd/user/snx-rs.service.d/10-chromium-saml.conf10
-rw-r--r--dot_config/systemd/user/teams-sii.service27
-rw-r--r--dot_config/systemd/user/teams-xsight.service27
3 files changed, 64 insertions, 0 deletions
diff --git a/dot_config/systemd/user/snx-rs.service.d/10-chromium-saml.conf b/dot_config/systemd/user/snx-rs.service.d/10-chromium-saml.conf
new file mode 100644
index 0000000..a5380e3
--- /dev/null
+++ b/dot_config/systemd/user/snx-rs.service.d/10-chromium-saml.conf
@@ -0,0 +1,10 @@
+[Service]
+# Force snx-rs to use the flatpak ungoogled-chromium as its SAML browser.
+# snx-rs calls `xdg-open <url>` via the `opener` crate. Prepending a private
+# PATH dir that contains an `xdg-open` shim makes the daemon find our shim
+# first, without affecting xdg-open for any other user process.
+#
+# Why not the system default browser? LibreWolf force-upgrades loopback to
+# HTTPS and enables LNA blocking, both of which break snx-rs's plain-HTTP
+# 127.0.0.1:7779 SAML callback. See firefox/user-overrides.js comments.
+Environment=PATH=%h/.local/share/snx-rs/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
diff --git a/dot_config/systemd/user/teams-sii.service b/dot_config/systemd/user/teams-sii.service
new file mode 100644
index 0000000..df0453e
--- /dev/null
+++ b/dot_config/systemd/user/teams-sii.service
@@ -0,0 +1,27 @@
+[Unit]
+Description=Microsoft Teams — Sii account (flatpak)
+PartOf=graphical-session.target
+After=graphical-session.target
+ConditionEnvironment=WAYLAND_DISPLAY
+
+[Service]
+Type=simple
+# Mirrors the Exec= line in teams-sii.desktop. --user-data-dir isolates this
+# instance from teams-xsight; --class is for sway window matching.
+ExecStart=/usr/bin/flatpak run com.github.IsmaelMartinez.teams_for_linux \
+ --class=teams-sii \
+ --user-data-dir=%h/.var/app/com.github.IsmaelMartinez.teams_for_linux/config/profile-sii \
+ --appIcon=%h/.local/share/icons/hicolor/256x256/apps/teams-sii.png \
+ "--appTitle=Teams — Sii"
+# Both Teams instances share the same flatpak app id, so we can't use
+# `flatpak kill <app-id>` in ExecStop (it would also kill the xsight one).
+# KillMode=mixed sends SIGTERM to the main process only — teams-for-linux
+# treats that as a real Quit (not tray-hide), and SIGKILL hits stragglers
+# after the stop timeout if Electron misbehaves.
+KillMode=mixed
+Restart=on-failure
+RestartSec=5s
+TimeoutStopSec=15s
+
+[Install]
+WantedBy=sway-session.target
diff --git a/dot_config/systemd/user/teams-xsight.service b/dot_config/systemd/user/teams-xsight.service
new file mode 100644
index 0000000..478f734
--- /dev/null
+++ b/dot_config/systemd/user/teams-xsight.service
@@ -0,0 +1,27 @@
+[Unit]
+Description=Microsoft Teams — XSight account (flatpak)
+PartOf=graphical-session.target
+After=graphical-session.target
+ConditionEnvironment=WAYLAND_DISPLAY
+
+[Service]
+Type=simple
+# Mirrors the Exec= line in teams-xsight.desktop. --user-data-dir isolates
+# this instance from teams-sii; --class is for sway window matching.
+ExecStart=/usr/bin/flatpak run com.github.IsmaelMartinez.teams_for_linux \
+ --class=teams-xsight \
+ --user-data-dir=%h/.var/app/com.github.IsmaelMartinez.teams_for_linux/config/profile-xsight \
+ --appIcon=%h/.local/share/icons/hicolor/256x256/apps/teams-xsight.png \
+ "--appTitle=Teams — XSight"
+# Both Teams instances share the same flatpak app id, so we can't use
+# `flatpak kill <app-id>` in ExecStop (it would also kill the sii one).
+# KillMode=mixed sends SIGTERM to the main process only — teams-for-linux
+# treats that as a real Quit (not tray-hide), and SIGKILL hits stragglers
+# after the stop timeout if Electron misbehaves.
+KillMode=mixed
+Restart=on-failure
+RestartSec=5s
+TimeoutStopSec=15s
+
+[Install]
+WantedBy=sway-session.target