nixdots/system/shared/security/polkit.nix

19 lines
443 B
Nix
Raw Normal View History

2024-07-26 23:07:07 +00:00
{
config,
lib,
...
}: {
2024-04-15 20:57:39 +00:00
security.polkit = {
enable = true;
debug = lib.mkDefault true;
# Have polkit log all actions, if debug is enabled
extraConfig = lib.mkIf config.security.polkit.debug ''
/* Log authorization checks. */
polkit.addRule(function(action, subject) {
polkit.log("user " + subject.user + " is attempting action " + action.id + " from PID " + subject.pid);
});
'';
};
}