nix/module/Polkit.nix

34 lines
642 B
Nix
Raw Normal View History

# Polkit agent is used by apps to ask for Root password with a popup.
{
2024-11-04 04:37:29 +03:00
config,
lib,
pkgs,
...
}: let
cfg = config.module.desktop.polkit;
in {
options.module.desktop.polkit.enable = lib.mkEnableOption "the polkit.";
2024-06-25 04:04:39 +03:00
2024-11-04 04:37:29 +03:00
config = lib.mkIf cfg.enable {
security.polkit.enable = true;
systemd = {
packages = with pkgs; [
polkit-kde-agent
];
user = {
services.plasma-polkit-agent = {
environment.PATH = lib.mkForce null;
serviceConfig = {
Restart = "always";
RestartSec = 2;
Slice = "session.slice";
};
wantedBy = [
"gui-session.target"
];
};
};
};
};
2024-03-29 14:06:51 +03:00
}