Set editor to neovim for visudo
This commit is contained in:
parent
39121e0636
commit
d5d181983a
19
nixos-config/config/sudoers
Normal file
19
nixos-config/config/sudoers
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Don't edit this file. Set the NixOS options ‘security.sudo.configFile’
|
||||||
|
# or ‘security.sudo.extraRules’ instead.
|
||||||
|
|
||||||
|
# Set editor to nvim
|
||||||
|
Defaults editor=/run/current-system/sw/bin/nvim
|
||||||
|
|
||||||
|
# Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
|
||||||
|
Defaults env_keep+=SSH_AUTH_SOCK
|
||||||
|
|
||||||
|
# "root" is allowed to do anything.
|
||||||
|
root ALL=(ALL:ALL) SETENV: ALL
|
||||||
|
|
||||||
|
# extraRules
|
||||||
|
%wheel ALL=(ALL:ALL) SETENV: ALL
|
||||||
|
|
||||||
|
|
||||||
|
# Keep terminfo database for root and %wheel.
|
||||||
|
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
||||||
|
Defaults:root,%wheel env_keep+=TERMINFO
|
@ -85,6 +85,9 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# sudoers file
|
||||||
|
security.sudo.configFile = (builtins.readFile ./config/sudoers);
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
services.xserver.layout = "ch";
|
services.xserver.layout = "ch";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user