mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-02 23:21:02 +01:00
Some files don't need nesting and can be root level again to reduce conflicts with other PRs. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
46 lines
870 B
Nix
46 lines
870 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib)
|
|
mkEnableOption
|
|
mkPackageOption
|
|
mkIf
|
|
maintainers
|
|
;
|
|
cfg = config.services.hyprpolkitagent;
|
|
in
|
|
{
|
|
meta.maintainers = with maintainers; [
|
|
bobvanderlinden
|
|
khaneliman
|
|
];
|
|
|
|
options = {
|
|
services.hyprpolkitagent = {
|
|
enable = mkEnableOption "Hyprland Policykit Agent";
|
|
package = mkPackageOption pkgs "hyprpolkitagent" { };
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
systemd.user.services.hyprpolkitagent = {
|
|
Unit = {
|
|
Description = "Hyprland PolicyKit Agent";
|
|
PartOf = [ config.wayland.systemd.target ];
|
|
After = [ config.wayland.systemd.target ];
|
|
};
|
|
|
|
Install = {
|
|
WantedBy = [ config.wayland.systemd.target ];
|
|
};
|
|
|
|
Service = {
|
|
ExecStart = "${cfg.package}/libexec/hyprpolkitagent";
|
|
};
|
|
};
|
|
};
|
|
}
|