dotfiles.nix/home.nix

164 lines
4.0 KiB
Nix
Raw Normal View History

2020-01-01 21:12:08 +00:00
{ pkgs, lib, ... }:
let
name = "Matthew Ess";
email = "daringseal@gmail.com";
workEmail = "mess@yelp.com";
in {
home = {
packages = with pkgs; [
# nix utilities
nixfmt
nix-prefetch-git
# command line utilities
ag
jq
tldr
# graphical applications
atom
firefox
enpass
termite
# graphical utilities
clipmenu
dmenu
i3lock-fancy
];
file = {
".config/fish/fishfile".text = ''
laughedelic/pisces
sijad/gitignore
joehillen/to-fish
jethrokuan/z
decors/fish-colored-man
franciscolourenco/done
haslersn/fish-nix-completions
gyakovlev/fish-fzy
joseluisq/gitnow
edc/bass
fishpkg/fish-get
fishpkg/fish-spin
oh-my-fish/plugin-bang-bang
fishpkg/fish-humanize-duration
jorgebucaran/fish-getopts
matthewess/fish-autovenv
'';
};
};
nixpkgs = { config.allowUnfree = true; };
programs = {
bat.enable = true;
broot.enable = true;
command-not-found.enable = true;
direnv.enable = true;
feh.enable = true;
firefox.enable = true;
fish = {
enable = true;
interactiveShellInit = ''
echo '(´) welcome (´)'
if not functions -q fisher
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
set VIRTUAL_ENV_DISABLE_PROMPT true
'';
};
git = {
enable = true;
userName = "${name}";
userEmail = "${workEmail}";
ignores = [ ".*.sw[a-z]" "tags" ];
extraConfig = {
color.ui = true;
core.editor = "vim";
push.default = "simple";
};
};
htop = {
enable = true;
highlightBaseName = true;
};
jq.enable = true;
man.enable = true;
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
neovim-sensible
vim-fugitive
vim-surround
nerdtree
nerdtree-git-plugin
vim-colorschemes
lightline-vim
];
extraConfig = ''
set shell=/bin/bash
set nocompatible
set cursorline "highlight current line
set showmatch "highlight matching [{()}]
set tabstop=2 "number of visual spaces per TAB when reading
set softtabstop=2 "number of spaces per TAB when editing
set expandtab "tabs are spaces
set shiftwidth=2 "indents
cmap w!! w !sudo tee >/dev/null %
set ww=<,>,[,] "wrap
colorscheme Tomorrow-Night-Eighties
"lightline options
let g:lightline = {'colorscheme': 'jellybeans'}
"view saving
au BufWinLeave ?* mkview 1
au BufWinEnter ?* silent loadview 1
"nerdtree
"show hidden files
let NERDTreeShowHidden=1
"open on vim open
autocmd vimenter * NERDTree
"switch to editing window
autocmd vimenter * wincmd p
"close if only nerdtree is left
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
'';
};
ssh.enable = true;
starship.enable = true;
termite.enable = true;
};
services = {
gnome-keyring.enable = true;
lorri.enable = true;
redshift = {
enable = true;
provider = "geoclue2";
};
screen-locker = {
enable = true;
lockCmd = "i3lock-fancy";
};
};
xsession = {
enable = true;
windowManager = {
i3 = {
enable = true;
config = rec {
modifier = "Mod4";
keybindings = lib.mkOptionDefault {
"${modifier}+c" = "exec 'CM_ONESHOT=1 clipmenud'";
"${modifier}+v" = "exec clipmenu";
"${modifier}+Escape" = "exec i3lock-fancy";
};
};
};
};
};
}