System/home-manager/linux/programs/desktop/polkit.nix

22 lines
639 B
Nix
Raw Normal View History

2023-06-20 02:12:49 -04:00
{ 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; };
};
}