On a default NixOS installation, the only editor installed is nano – yet visudo is hard-coded to look for vi at /usr/bin/vi. Not only is vi not installed, it won’t be installed in that path.

Overriding by setting VISUAL or EDITOR to $(which nano) does not work (I verified that it works on my Fedora machine).

Submitted by Michel Alexandre Salim on 26 April 2012 at 14:09

On 26 April 2012 at 15:53 Eelco Dolstra closed this issue.

On 26 April 2012 at 15:53 Eelco Dolstra commented:

Visudo shouldn’t be used in NixOS, because the sudoers file is created and and managed by NixOS through the “security.sudo.configFile” configuration option.

We should probably get rid of visudo to prevent confusion.

Log in to post comments