Polkit: Difference between revisions

imported>Chewie
Mention use of systemd user service to launch a polkit authentication agent
imported>Robbins
mNo edit summary
Line 17: Line 17:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
systemd = {
systemd = {
    user.services.polkit-gnome-authentication-agent-1 = {
  user.services.polkit-gnome-authentication-agent-1 = {
     description = "polkit-gnome-authentication-agent-1";
     Unit = {
    wants = [ "graphical-session.target" ];
      Description = "polkit-gnome-authentication-agent-1";
    wantedBy = [ "graphical-session.target" ];
      Wants = [ "graphical-session.target" ];
    after = [ "graphical-session.target" ];
      WantedBy = [ "graphical-session.target" ];
     serviceConfig = {
      After = [ "graphical-session.target" ];
     };
    Service = {
       Type = "simple";
       Type = "simple";
      ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
        ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
      Restart = "on-failure";
        Restart = "on-failure";
      RestartSec = 1;
        RestartSec = 1;
      TimeoutStopSec = 10;
        TimeoutStopSec = 10;
    };
      };
   };
   };
};
};
</syntaxhighlight>
</syntaxhighlight>