32 lines
748 B
Nix
32 lines
748 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) mkIf mkEnableOption;
|
|
cfg = config.nixos.services.polkit;
|
|
in
|
|
{
|
|
options = {
|
|
nixos.services.polkit.enable = mkEnableOption "Enables polkit";
|
|
};
|
|
config = mkIf cfg.enable {
|
|
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
|
description = "polkit-gnome-authentication-agent-1";
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
|
Restart = "on-failure";
|
|
RestartSec = 1;
|
|
TimeoutStopSec = 10;
|
|
};
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
wants = [ "graphical-session.target" ];
|
|
after = [ "graphical-session.target" ];
|
|
};
|
|
};
|
|
}
|