Files
nixos/modules/system/core/user.nix
T
ahmza 56cf8f875f allow passwordless sudo for ahmza
adds security.sudo.extraRules with NOPASSWD: ALL. the rule is emitted after the default %wheel SETENV rule and sudoers is last-match-wins, so it takes precedence. lives in the shared user module, so it applies to both shadow and t480.
2026-08-05 21:51:26 +01:00

43 lines
715 B
Nix

{self, ...}: {
flake.nixosModules.user = {
pkgs,
...
}: let
modules = with self.nixosModules; [
zsh
stow
];
in {
imports = modules;
ahmza.stow = {
enable = true;
user = "ahmza";
# repoPath defaults to /home/ahmza/dot
};
security.sudo.extraRules = [
{
users = ["ahmza"];
commands = [
{
command = "ALL";
options = ["NOPASSWD"];
}
];
}
];
users.users.ahmza = {
isNormalUser = true;
initialPassword = "qwer";
shell = pkgs.zsh;
description = "ahmza";
extraGroups = [
"networkmanager"
"wheel"
];
};
};
}