33 lines
777 B
Nix
33 lines
777 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib) mkIf mkEnableOption;
|
|
cfg = config.home.services.polkit;
|
|
in {
|
|
options = {
|
|
home.services.polkit.enable = mkEnableOption "Enables polkit";
|
|
};
|
|
config = mkIf cfg.enable {
|
|
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
|
Unit.Description = "polkit-gnome-authentication-agent-1";
|
|
|
|
Install = {
|
|
WantedBy = ["graphical-session.target"];
|
|
# Wants = ["graphical-session.target"];
|
|
# After = ["graphical-session.target"];
|
|
};
|
|
|
|
Service = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
|
Restart = "on-failure";
|
|
RestartSec = 1;
|
|
TimeoutStopSec = 10;
|
|
};
|
|
};
|
|
};
|
|
}
|