Allow sudo without password in init config
This commit is contained in:
parent
78816b2ef5
commit
2cf56af083
|
@ -43,4 +43,26 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
extraRules = [
|
||||
{
|
||||
users = [ "nixos" ];
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild -j auto switch";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
{
|
||||
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "SETENV" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue