31 lines
810 B
Nix
31 lines
810 B
Nix
{ lib, config, pkgs, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.modules.desktop.mate-polkit;
|
|
in {
|
|
options.modules.desktop.mate-polkit = {
|
|
enable = mkEnableOption "Enable the MATE desktop environment polkit authentication agent";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
hm.systemd.user.services.mate-polkit = {
|
|
Unit = {
|
|
Description = "the MATE desktop environment polkit authentication agent";
|
|
After = [ "graphical-session-pre.target" ];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Install = {
|
|
WantedBy = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Service = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";
|
|
Restart = "on-failure";
|
|
RestartSec = 5;
|
|
};
|
|
};
|
|
};
|
|
}
|