diff options
author | tv <tv@krebsco.de> | 2015-11-01 13:59:53 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-11-01 13:59:53 +0100 |
commit | 901043ca8bbc47ca2b8a780ff58986181f958c84 (patch) | |
tree | ed6ee0aa0fa40e1ecd276ed44083131ef98925c6 /tv/2configs | |
parent | a031a7ff6b94a0f30cea06d51c3a347a8b7fc8c6 (diff) |
tv vim: decouple vimrc from ENV
Diffstat (limited to 'tv/2configs')
-rw-r--r-- | tv/2configs/vim.nix | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index f174438..b9ee725 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -4,33 +4,24 @@ with lib; let out = { environment.systemPackages = [ - vim' + pkgs.vim ]; # Nano really is just a stupid name for Vim. - # Note: passing just pkgs.vim to cvs to not rebuild it all the time nixpkgs.config.packageOverrides = pkgs: { - cvs = pkgs.cvs.override { nano = pkgs.vim; }; - nano = vim'; + nano = pkgs.vim; }; + environment.etc.vimrc.source = vimrc; + environment.variables.EDITOR = mkForce "vim"; + environment.variables.VIMINIT = ":so /etc/vimrc"; }; extra-runtimepath = concatStringsSep "," [ "${pkgs.vimPlugins.undotree}/share/vim-plugins/undotree" ]; - vim' = pkgs.writeScriptBin "vim" '' - #! /bin/sh - set -efu - ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/backup - ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/cache - ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/undo - export VIMINIT; VIMINIT=':so ${vimrc}' - exec ${pkgs.vim}/bin/vim "$@" - ''; - vimrc = pkgs.writeText "vimrc" '' set nocompatible |