nichts/nyx/homes/notashelf/services/shared/polkit.nix
2024-04-09 23:11:33 +02:00

22 lines
642 B
Nix

{
lib,
osConfig,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
dev = modules.device;
sys = modules.system;
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
in {
config = mkIf ((builtins.elem dev.type acceptedTypes) && sys.video.enable) {
# gnome polkit agent
systemd.user.services.polkit-pantheon-authentication-agent-1 = lib.mkGraphicalService {
#Service.ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Service.ExecStart = "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit";
};
};
}