3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/programs/vim.nix

24 lines
518 B
Nix
Raw Normal View History

2016-10-10 21:49:43 +01:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.vim;
in {
options.programs.vim = {
defaultEditor = mkOption {
type = types.bool;
default = false;
description = ''
When enabled, installs vim and configures vim to be the default editor
using the EDITOR environment variable.
'';
};
};
config = mkIf cfg.defaultEditor {
environment.systemPackages = [ pkgs.vim ];
environment.variables = { EDITOR = mkOverride 900 "vim"; };
};
}