about summary refs log tree commit diff
path: root/modules/nixos/vim/default.nix
blob: 16e2d51229b272337620b53ef307975b9da0d094 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
  config,
  lib,
  pkgs,
  this,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.vim;
in {
  config = mkIf cfg.enable {
    programs.vim.package =
      (pkgs.vim-full.override {
        features = "normal";
        cscopeSupport = false;
        darwinSupport = false;
        guiSupport =
          if this.isHeadful
          then "gtk3"
          else false;
        luaSupport = false;
        multibyteSupport = false;
        netbeansSupport = false;
        nlsSupport = false;
        perlSupport = false;
        pythonSupport = false;
        rubySupport = false;
        tclSupport = false;
        ximSupport = false;
      })
      .customize {
        name = "vim";
        vimrcConfig = with cfg; {
          customRC = rc;
          packages.myVimPackage.start = plugins;
        };
      };
  };
}

Consider giving Nix/NixOS a try! <3