Change:
# List packages installed in system profile. To search, run: # $ nix search wget # environment.systemPackages = with pkgs; [ <del> #   wget vim </del> <ins> #   nano vim # don't forget to add an editor to edit configuration.nix! #   wget </ins> #   firefox # ];

Discussion:
fresh/clean install. edi the config file to add a package (in this case an editor) - but no editor is easy to find in the initial config to edit later the config (this is called the chicken and egg problem?) by the way - the manual, when mentioning the config file, point out its full name (including the location in /etc/nixos). this is not obvious when you run nix the first time! (This happens with all reasonable NixOS versions — )
is an editor, . , you can or something without editing config, then, if desired, remove the editor from profile when it is installed system-wide.
thank you - i did not think of nano. i was looking through the menus and did not find any; of course, nano would not be listed there. perhaps you add a comment to avoid stupid questions like this from newbies trying to use your interesting OS.
Let's hijack the issue to describe the real problem then…
While we are on it we could also think about adding an option in nix that installs your chosen default editor and sets the env accordingly.
good idea! for newbies, give some hints (e.g. gedit or similar)
Perhaps add to the template? But I saw that we also have and .
I suggest we deprecate.
add one of the simple editors as well - gedit, mousepad or one of the other graphical easy ones. It is important to have a very low entry threshold to capture new potential users. Something like the 2 second rules on web pages: if the new OS does not work out of the box for the newbie, it is dumped...
I'm all for making editing text files easy, but I'm not sure what good it is to set EDITOR to something with a gui. I think a user that might need help with editing text files will install a desktop environment that presents it's default editor to the user by itself. On the other hand, a user might try to do something like ` because they pasted it from some web page and unknowingly run gedit with root, making their system insecure.
What makes it more insecure and using an terminal-based one with root privileges?
is expected to point to an editor that works without X, whether run as root or not. uses and is expected to also work in the system terminals, independent of whether any X session is present.

I'm all for setting EDITOR to something sane like by default and for generalizing it similarly to X11. I don't think this argument really applies to NixOS. Any OS that requires you to edit some configuration files before you even install it is not for a newbie unless that newbie has some interested IT personnel around. I imagine it could be possible to make a usable GUI for with text lenses (in Haskell), though. But, in general, good installers (like Debian's) take a lot of effort to produce and yet most people never ever install their OS and most people that do install their OS could have just learned the shell commands.
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly: for maintainers and people that previously touched the related code and @ mention them in a comment. on the . on the on .
I think we should include nano in our that we generate.
Would be the right place to change that?
I marked this as stale due to inactivity. &rarr;
yes.