22 lines
409 B
Nix
22 lines
409 B
Nix
{ pkgs, inputs, ... }:
|
|
let
|
|
commandsWithoutPassword = [
|
|
"/run/current-system/sw/bin/systemctl restart tor.service"
|
|
];
|
|
in
|
|
{
|
|
security.sudo = {
|
|
execWheelOnly = true;
|
|
extraRules = [
|
|
{
|
|
groups = [ "wheel" ];
|
|
commands = map
|
|
(cmd: {
|
|
command = cmd;
|
|
options = [ "NOPASSWD" ];
|
|
})
|
|
commandsWithoutPassword;
|
|
}
|
|
];
|
|
};
|
|
}
|