first commit
This commit is contained in:
24
modules/optionnal/sudo-nopasswd.nix
Normal file
24
modules/optionnal/sudo-nopasswd.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# https://dev.to/patimapoochai/how-to-edit-the-sudoers-file-in-nixos-with-examples-4k34
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
{
|
||||
users = [ "${username}" ];
|
||||
host = "ALL";
|
||||
runAs = "ALL:ALL";
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
#extraConfig = "#includedir /etc/sudoers.d";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user