From c1ca8974b3330301c8b6939277db3beedb5c3ca1 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 20 Mar 2025 22:32:31 -0500 Subject: [PATCH] hyprpolkitagent: use wayland.systemd.target --- modules/services/hyprpolkitagent.nix | 9 ++++----- .../services/hyprpolkitagent/basic-configuration.nix | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/services/hyprpolkitagent.nix b/modules/services/hyprpolkitagent.nix index b9bf4c87b..0ce553875 100644 --- a/modules/services/hyprpolkitagent.nix +++ b/modules/services/hyprpolkitagent.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, ... }: let - inherit (lib) - mkEnableOption mkPackageOption types literalExpression mkIf maintainers; + inherit (lib) mkEnableOption mkPackageOption mkIf maintainers; cfg = config.services.hyprpolkitagent; in { meta.maintainers = [ maintainers.bobvanderlinden ]; @@ -17,11 +16,11 @@ in { systemd.user.services.hyprpolkitagent = { Unit = { Description = "Hyprland PolicyKit Agent"; - After = [ "graphical-session-pre.target" ]; - PartOf = [ "graphical-session.target" ]; + PartOf = [ config.wayland.systemd.target ]; + After = [ config.wayland.systemd.target ]; }; - Install = { WantedBy = [ "graphical-session.target" ]; }; + Install = { WantedBy = [ config.wayland.systemd.target ]; }; Service = { ExecStart = "${cfg.package}/libexec/hyprpolkitagent"; }; }; diff --git a/tests/modules/services/hyprpolkitagent/basic-configuration.nix b/tests/modules/services/hyprpolkitagent/basic-configuration.nix index ab39fc2a2..806d495b9 100644 --- a/tests/modules/services/hyprpolkitagent/basic-configuration.nix +++ b/tests/modules/services/hyprpolkitagent/basic-configuration.nix @@ -14,7 +14,7 @@ ExecStart=@hyprpolkitagent@/libexec/hyprpolkitagent [Unit] - After=graphical-session-pre.target + After=graphical-session.target Description=Hyprland PolicyKit Agent PartOf=graphical-session.target ''