fix: wheelsudo

This commit is contained in:
Truxnell 2024-03-24 18:50:38 +11:00
parent 4e3302f999
commit 85e8b4774d
2 changed files with 17 additions and 2 deletions

View file

@ -63,6 +63,21 @@ cd ~/dotfiles
nixos-rebuild switch --flake .#nameOfMachine --target-host machineToSshInto --use-remote-sudo
```
## Hacking at nix files
Eval config to see what keys are being set.
```bash
nix eval .#nixosConfigurations.rickenbacker.config.security.sudo.WheelNeedsPassword
nix eval .#nixosConfigurations.rickenbacker.config.mySystem.security.wheelNeedsPassword
```
Quickly run a flake to see what the next error message is as you hack.
```bash
nixos-rebuild dry-run --flake . --fast --impure
```
## Links & References
- [Misterio77/nix-starter-config](https://github.com/Misterio77/nix-starter-configs)

View file

@ -17,8 +17,8 @@ in
config =
{
security.pam.enableSSHAgentAuth = lib.mkIf cfg.sshAgentAuth.enable true;
security.sudo.wheelNeedsPassword = lib.mkIf cfg.wheelNeedsSudoPassword true;
security.pam.enableSSHAgentAuth = cfg.sshAgentAuth.enable;
security.sudo.wheelNeedsPassword = cfg.wheelNeedsSudoPassword;
};