From 9ff47e94b2c3acd57e1c57268bc257055a240072 Mon Sep 17 00:00:00 2001 From: kenji Date: Thu, 15 Jan 2026 15:52:35 -0600 Subject: [PATCH] fix(swayosd): ensure swayosd starts reliably - Add explicit 'systemctl --user start swayosd' to Hyprland exec-once - Harden systemd service definition with proper dependencies and targets --- apps/hyprland/hypr/exec.nix | 1 + apps/swayosd/default.nix | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/hyprland/hypr/exec.nix b/apps/hyprland/hypr/exec.nix index a8418ad..ae5ab85 100644 --- a/apps/hyprland/hypr/exec.nix +++ b/apps/hyprland/hypr/exec.nix @@ -15,6 +15,7 @@ # essentials "hyprpm reload -n" "systemctl --user start hyprpolkitagent" + "systemctl --user start swayosd" "hyprsunset -t 4500" # TODO: must be optional ]; }; diff --git a/apps/swayosd/default.nix b/apps/swayosd/default.nix index eff65ca..a25a7b5 100644 --- a/apps/swayosd/default.nix +++ b/apps/swayosd/default.nix @@ -10,11 +10,14 @@ Unit = { StartLimitBurst = lib.mkForce 5; StartLimitIntervalSec = lib.mkForce 30; + After = [ "graphical-session.target" ]; + PartOf = [ "graphical-session.target" ]; }; Service = { Restart = lib.mkForce "on-failure"; - RestartSec = lib.mkForce "100ms"; + RestartSec = lib.mkForce "1s"; }; + Install.WantedBy = [ "graphical-session.target" ]; }; wayland.windowManager.hyprland.settings = {