mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
7bb8a42095
vimHugeX is now an alias for vim-full
34 lines
782 B
Nix
34 lines
782 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.programs.vim;
|
|
in {
|
|
options.programs.vim = {
|
|
defaultEditor = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = lib.mdDoc ''
|
|
When enabled, installs vim and configures vim to be the default editor
|
|
using the EDITOR environment variable.
|
|
'';
|
|
};
|
|
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = pkgs.vim;
|
|
defaultText = literalExpression "pkgs.vim";
|
|
example = literalExpression "pkgs.vim-full";
|
|
description = lib.mdDoc ''
|
|
vim package to use.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.defaultEditor {
|
|
environment.systemPackages = [ cfg.package ];
|
|
environment.variables = { EDITOR = mkOverride 900 "vim"; };
|
|
};
|
|
}
|