feat(nixos): add sudo module and refactor user options

This commit is contained in:
Mohammad Rafiq 2025-07-07 19:30:04 +08:00
parent 03fca8b28b
commit aa06b5f6fd
No known key found for this signature in database
2 changed files with 13 additions and 8 deletions

View 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" ];
};
}