summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-11-01 13:59:53 +0100
committertv <tv@shackspace.de>2015-11-01 13:59:53 +0100
commit6412cdf137a7b1993473937988648517a06629a9 (patch)
tree3c0b2309eef775b16892924455b3b9e24408b704 /tv/2configs
parent4d43b92b22972e663f72e2b48f5f0892aff4334a (diff)
tv vim: decouple vimrc from ENV
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/vim.nix19
1 files changed, 5 insertions, 14 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index f17443871..b9ee725b8 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