security: Move sudo configuration into module
This commit is contained in:
parent
8121d120e8
commit
6d33824dfc
3 changed files with 17 additions and 12 deletions
15
modules/sudo.nix
Normal file
15
modules/sudo.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config.security.sudo = {
|
||||
enable = true;
|
||||
execWheelOnly = true;
|
||||
extraRules = [{
|
||||
groups = [ "wheel" ];
|
||||
commands = [{
|
||||
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||
options = [ "NOPASSWD" ];
|
||||
}];
|
||||
}];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue