aktualizacja domyślnego hosta
This commit is contained in:
40
hosts/default/config/security.nix
Normal file
40
hosts/default/config/security.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{...}: {
|
||||
# Security / Polkit
|
||||
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
|
||||
'';
|
||||
};
|
||||
sudo = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Defaults pwfeedback
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
mutableUsers = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user