feat(nixos): add sudo module and refactor user options
This commit is contained in:
parent
03fca8b28b
commit
aa06b5f6fd
2 changed files with 13 additions and 8 deletions
11
nix/modules/system/sudo.nix
Normal file
11
nix/modules/system/sudo.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
cfg = config.flake;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.default = {
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
nix.settings.trusted-users = [ "@wheel" ];
|
||||
users.users.${cfg.admin.username}.extraGroups = [ "wheel" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue