[Nix-dev] Using Nix to manage dotfiles
Marc Weber
marco-oweber at gmx.de
Tue Feb 11 04:06:49 CET 2014
About bash/zsh: I once had a patch (still using it) which has some
support for opting in/out from bash/zsh features.
The main thing was adding
source /etc/bash/setup-all
which serves as example. This way users get updates (this is nicer than
having a symlink, because users can edit easier).
For .vim you can can use "source otherfile.vim", too.
Then users can opt out (maybe even temporarely).
You can be even smarter:
if $NIX_DEFAULTS == yes
source ..
endif
then users can opt-out/in by controlling NIX_DEFAULTS ..
Please note that vim plugin support is still week in nixos.
The perfect upstream would be joiniing bitbucket.org/vimcommunity/vim-pi
and use that as source. Then there would be about 5000 plugins of which
only some would be used ... (?)
vim-addon-manager does apply some manually patched magic to move some
files into the correct directories or setting a subdir to be the
runtimepath.
Duplicating it can be done, it might be worth it - but would take some
time. If you want to do it talk to vim-pi team (eg by creating issues)
http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html
shows all options about managing plugins which are known to me in some
way.
Eg NeoBundle and vim-addon-manager both allow lazy loading of plugins as
needed.
https://github.com/MarcWeber/vim-addon-manager
(Those are just some thoughts ..)
Marc Weber
More information about the nix-dev
mailing list