mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
9536169074
They contain no useful information and increase the length of the autogenerated options documentation. See discussion in #18816.
23 lines
518 B
Nix
23 lines
518 B
Nix
{ 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"; };
|
|
};
|
|
}
|