summaryrefslogtreecommitdiff
path: root/modules/examples
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2016-12-11 16:24:37 +0100
committerDaiderd Jordan <daiderd@gmail.com>2016-12-11 16:25:28 +0100
commit41d40d04172bca296374a39f040226e5a469f531 (patch)
treeb9dfe74fbb15aef59f9fef0bc3cccb5ca6ece2f4 /modules/examples
parent19d66287a000433f92b231310a5265eb7d03efb2 (diff)
add nixpkgs.config option
Diffstat (limited to 'modules/examples')
-rw-r--r--modules/examples/lnl.nix69
1 files changed, 69 insertions, 0 deletions
diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix
index ec201b6..06f876f 100644
--- a/modules/examples/lnl.nix
+++ b/modules/examples/lnl.nix
@@ -150,4 +150,73 @@
. /etc/zshrc.local
fi
'';
+
+ nixpkgs.config.allowUnfree = true;
+
+ nixpkgs.config.packageOverrides = self: {
+ lnl.zsh = pkgs.runCommand pkgs.zsh.name
+ { buildInputs = [ pkgs.makeWrapper ]; }
+ ''
+ source $stdenv/setup
+
+ mkdir -p $out/bin
+ makeWrapper ${pkgs.zsh}/bin/zsh $out/bin/zsh
+ '';
+
+ lnl.tmux = pkgs.runCommand pkgs.tmux.name
+ { buildInputs = [ pkgs.makeWrapper ]; }
+ ''
+ source $stdenv/setup
+
+ mkdir -p $out/bin
+ makeWrapper ${pkgs.tmux}/bin/tmux $out/bin/tmux \
+ --add-flags -f --add-flags /run/current-system/etc/tmux.conf
+ '';
+
+ lnl.vim = pkgs.vim_configurable.customize {
+ name = "vim";
+ vimrcConfig.customRC = ''
+ set nocompatible
+ filetype plugin indent on
+ syntax on
+
+ colorscheme solarized
+ set bg=dark
+
+ set et sw=2 ts=2
+ set bs=indent,start
+
+ set nowrap
+ set list
+ set listchars=tab:»·,trail:·,extends:⟩,precedes:⟨
+ set fillchars+=vert:\ ,stl:\ ,stlnc:\
+
+ set lazyredraw
+
+ set clipboard=unnamed
+
+ vmap s S
+
+ cnoremap %% <C-r>=expand('%:h') . '/'<CR>
+
+ set hlsearch
+ nnoremap // :nohlsearch<CR>
+
+ let mapleader = ' '
+ nnoremap <Leader>p :FZF<CR>
+ nnoremap <silent> <Leader>e :exe 'FZF ' . expand('%:h')<CR>
+
+ source $HOME/.vimrc.local
+ '';
+ # vimrcConfig.vam.knownPlugins = with pkgs.vimUtils; (pkgs.vimPlugins // {
+ # vim-nix = buildVimPluginFrom2Nix {
+ # name = "vim-nix-unstable";
+ # src = ../../../vim-nix;
+ # };
+ # });
+ vimrcConfig.vam.pluginDictionaries = [
+ { names = [ "fzfWrapper" "youcompleteme" "fugitive" "surround" "vim-nix" "colors-solarized" ]; }
+ ];
+ };
+ };
}