security/sudo: disable lecture and no longer persist /var/db

This commit is contained in:
Lu Wang 2024-12-14 02:02:41 +08:00
parent ee55e4a237
commit 2f202aac57
Signed by: rebmit
SSH key fingerprint: SHA256:3px8QV1zEerIrEWHaqtH5rR9kjetyRST5EipOPrd+bU
3 changed files with 12 additions and 1 deletions

View file

@ -17,6 +17,7 @@ let
# keep-sorted start
programs.tools.common
security.polkit
security.sudo
services.dbus
services.journald
services.openssh

View file

@ -0,0 +1,10 @@
{ ... }:
{
security.sudo = {
execWheelOnly = true;
wheelNeedsPassword = true;
extraConfig = ''
Defaults lecture="never"
'';
};
}

View file

@ -2,7 +2,7 @@
{
environment.globalPersistence = {
directories = [
"/var/db"
"/var/cache"
"/var/lib"
"/var/log"
"/var/tmp"