refactor(systemModule:security): split into modules and add kernel hardening
This commit is contained in:
parent
2c25c8c762
commit
3a91848085
6 changed files with 322 additions and 53 deletions
19
system/modules/security/polkit/default.nix
Normal file
19
system/modules/security/polkit/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkDefault mkIf;
|
||||
in
|
||||
|
||||
{
|
||||
security.polkit = {
|
||||
enable = true;
|
||||
debug = mkDefault true;
|
||||
extraConfig = 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);
|
||||
});
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue