2.home-manager/modules/services/polkit-gnome.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

45 lines
872 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";
};
};
};
}