refactor auth-agent

This commit is contained in:
Adithya 2024-04-26 22:43:37 +05:30
parent 9cc08ef25d
commit 938f0779fd
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C

View file

@ -1,12 +1,8 @@
{ pkgs, ... }: { pkgs, ... }: {
let
agent = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
in
{
systemd.user = { systemd.user = {
services.auth-agent = { services.auth-agent = {
Unit = { Unit = {
Description = "Polkit AUthentication Agent"; Description = "Polkit Authentication Agent";
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
After = [ "graphical-session-pre.target" ]; After = [ "graphical-session-pre.target" ];
}; };
@ -14,7 +10,7 @@ in
WantedBy = [ "graphical-session.target" ]; WantedBy = [ "graphical-session.target" ];
}; };
Service = { Service = {
ExecStart = "${agent}"; ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure"; Restart = "on-failure";
}; };
}; };