nixos/vim: configurable vim package (#100132)

This commit is contained in:
Alvar 2020-10-15 10:55:16 +02:00 committed by GitHub
parent 0673b245d2
commit 17bcc043f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,10 +14,20 @@ in {
using the EDITOR environment variable.
'';
};
package = mkOption {
type = types.package;
default = pkgs.vim;
defaultText = "pkgs.vim";
example = "pkgs.vimHugeX";
description = ''
vim package to use.
'';
};
};
config = mkIf cfg.defaultEditor {
environment.systemPackages = [ pkgs.vim ];
environment.variables = { EDITOR = mkOverride 900 "vim"; };
environment.systemPackages = [ cfg.package ];
environment.variables = { EDITOR = mkOverride 900 "vim"; };
};
}