This commit is contained in:
2025-09-13 23:16:22 +02:00
commit 5057e1effa
179 changed files with 20524 additions and 0 deletions

22
modules/core/security.nix Normal file
View File

@@ -0,0 +1,22 @@
_: {
security = {
rtkit.enable = true;
polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function(action, subject) {
if ( subject.isInGroup("users") && (
action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions"
))
{ return polkit.Result.YES; }
})
'';
};
pam.services.swaylock = {
text = ''auth include login '';
};
};
}