Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
My main motivation is to provide the
services.vim.defaultEditor
wich a user could set in order to make vim (instead of nano) the system wide default text editor via theEDITOR
environment variable (and it'll install vim if that isn't already the case). I don't know if theservices.vim.install
option makes sense since the same effect can be achieved by simply adding vim to the systemPackages.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)Note: If both
services.vim.defaultEditor
andservices.emacs.defaultEditor
are set vim will be the default editor (not tested...) since the priority is lower (mkForce
/mkOverride 10
vsmkOverride 900
). Is that ok or should I also use 900? I just thought mkForce (which apparently uses 10) would fit better. I must also admit that this probably isn't the best solution due to the emacs collision, however the user should avoid that anyway. An alternative would be to introduce a genericdefaultEditor
option.