mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-06 17:11:03 +01:00
32 lines
835 B
Nix
32 lines
835 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
inherit (lib)
|
|
mkEnableOption mkPackageOption types literalExpression mkIf maintainers;
|
|
cfg = config.services.polkit-gnome;
|
|
in {
|
|
meta.maintainers = [ maintainers.bobvanderlinden ];
|
|
|
|
options = {
|
|
services.polkit-gnome = {
|
|
enable = mkEnableOption "GNOME Policykit Agent";
|
|
package = mkPackageOption pkgs "polkit_gnome" { };
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
systemd.user.services.polkit-gnome = {
|
|
Unit = {
|
|
Description = "GNOME PolicyKit Agent";
|
|
After = [ "graphical-session-pre.target" ];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
Service = {
|
|
ExecStart =
|
|
"${cfg.package}/libexec/polkit-gnome-authentication-agent-1";
|
|
};
|
|
};
|
|
};
|
|
}
|