{ pkgs, ... }: { security.sudo.enable = false; security.doas = { enable = true; wheelNeedsPassword = false; extraRules = [{ groups = [ "wheel" ]; # keepEnv = true; # I need to set NIX_PATH explicitly, since my user and root use different paths setEnv = [ "NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels" ]; }]; }; environment.shellAliases = { sudo = "doas"; }; }