nixpkgs/nixos/modules/programs/vim.nix
Naïm Favier 7bb8a42095
nixos/vim: fix example package
vimHugeX is now an alias for vim-full
2022-12-14 14:25:30 +01:00

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"; };
};
}