New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VIM: module #23089
VIM: module #23089
Conversation
@ndowens, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @bjornfor and @offlinehacker to be potential reviewers. |
I'm not sure if this is worth it. It changes a two line config into one (in /etc/nixos/configuration.nix). Also, the "services" namespace for this option feels wrong. |
}; | ||
|
||
config = mkIf cfg.defaultEditor { | ||
environment.systemPackages = [ pkgs.vim ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a bunch of different versions of vim in nixpkgs, can you include an option for the package that should be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
@bjornfor if you look at emacs, it uses the same namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason emacs is under services is because it provides a user service, that's not the case here.
}; | ||
|
||
config = mkIf cfg.defaultEditor { | ||
environment.systemPackages = [ pkgs.vimnox ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was talking about a configurable package option used by the rest of the module, pkgs.vim
is fine as a default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @LnL7
I would agree with @bjornfor and say no here. It is really not worth it, sorry! |
@matthiasbryer maybe it isn't? But just trying to contribute in what I can do and enjoy trying to do something. Thought maybe since emacs had a module then vim should have one , in which I founder later on it does have one |
nixos/modules/module-list.nix
Outdated
@@ -191,6 +191,7 @@ | |||
./services/development/hoogle.nix | |||
./services/editors/emacs.nix | |||
./services/editors/infinoted.nix | |||
./services/editors/vim.nix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line as there is no vim service.
nixos/modules/programs/vim.nix
Outdated
When enabled, installs vim and configures vim to be the default editor | ||
using the EDITOR environment variable. | ||
When enabled, installs vim and configures vim to be the default editor | ||
using the EDITOR environment variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indention was right before. Please revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fpletz Done with both requests
Vim module: Specified which VIM package to use Edited existing VIM-module, and added package option VIM module: added missing function Removed VIM from services module, fixed indention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having a package option for this makes sense.
I think nixos/modules/programs/vim.nix should be deprecated and then
removed.
Reason:
I can tolerate a separate for Emacs because that module implements user
systemd thing that runs "emacs --daemon" (KISS principle asks "Duuude,
why won't you just `emacs --daemon` to your .xsession?" but, alas,
systemd is far from KISS already). Vim AFAIK has no such thing.
Current nixos/modules/programs/vim.nix is 24 lines while its `config`
section is just two. Feels like useless cruft that slows down nixos
evaluation.
|
All I wanted to do was update it a bit :) |
I have nothing against you personally. And PR are a way of learning too,
so keep going, propose changes in anything you like, no problem with
that.
It's just maintainers need to have a right to reject stuff. And this
module happens to be a good example that slipped through review but
needs to be rejected IMO.
|
It was introduced in #19438 |
Motivation for this change
Enable VIM to be set as default editor
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/
)