25 lines
459 B
Nix
25 lines
459 B
Nix
{
|
|
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";
|
|
};
|
|
}
|