nix-conf/home/home.nix
2020-02-06 15:21:28 +01:00

151 lines
3.2 KiB
Nix

{ pkgs, ...}:
let duplicity =
pkgs.duplicity.overrideAttrs (oldAttrs: rec {
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [ pkgs.backblaze-b2 ];
doCheck = false;
doInstallCheck = false;
});
in
{
imports = [
./development.nix
./gui.nix
./hacking.nix
./gaming.nix
];
home.packages = with pkgs; [
# Some base applications
htop socat
tmux mpv manpages
fzf bat python2 python3 keepassxc
qemu
unzip keybase mc bat
jdk11 ranger exa
usbutils pciutils
gnupg
libusb
mosh
reptyr
rtv
# backup things
duplicity
];
programs.home-manager.enable = true;
programs.zsh = {
enable = true;
shellAliases = {
l = "ls -lh";
ll = "ls -lah";
};
history = {
extended = true;
ignoreDups = true;
share = false;
};
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
};
};
programs.man.enable = true;
programs.vim = {
enable = true;
#extraConfig = builtins.readFile vim/vimrc;
extraConfig = ''
let mapleader=","
set hlsearch
map <silent> <leader>n :silent :nohlsearch <CR>
nnoremap <silent> <F2> :NERDTreeToggle<CR>
nnoremap <silent> <F3> :NERDTreeVCS @% <CR>
let NERDTreeQuitOnOpen=1
set shortmess=atI
set cursorline
set incsearch
set lazyredraw
set encoding=utf8
set title
" Learn proper keybindings dude!
noremap <Up> <nop>
noremap <Down> <nop>
noremap <Left> <nop>
noremap <Right> <nop>
inoremap <Up> <nop>
inoremap <Down> <nop>
inoremap <Left> <nop>
inoremap <Right> <nop>
" Backups not needed
set nobackup
set nowritebackup
" CoC settings
inoremap <silent><expr> <c-space> coc#refresh()
" Use `[g` and `]g` to navigate diagnostics
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" Remap keys for gotos
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
" Do default action for next item.
nnoremap <silent> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent> <space>k :<C-u>CocPrev<CR>
'';
settings = {
expandtab = true;
number = true;
relativenumber = true;
tabstop = 4;
shiftwidth = 4;
};
plugins = with pkgs.vimPlugins; [
idris-vim
sensible
vim-airline
The_NERD_tree
fugitive
vim-gitgutter
rust-vim
coc-rls
coc-nvim
coc-json
];
};
programs.ssh = {
enable = true;
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
};
services.keybase.enable = true;
}