{ config, lib, pkgs, ... }: let hyprland = config.nathan.programs.hyprland.enable; targets = config.nathan.config.desktop.targets; in lib.mkif hyprland { home.packages = with pkgs; [ libsForQt5.polkit-kde-agent ]; # Setup polkit as a service systemd.user.services.polkit-kde = { Unit = { Description = "Polkit kde authentication agent"; After = [ "graphical-session.target" ]; }; Service = { Type = "simple"; ExecStart = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; Restart = "on-failure"; }; Install = { WantedBy = targets; }; }; }