@ -3,17 +3,16 @@
let
secrets = import ./secrets.nix ;
in
{
home . packages = with pkgs ; [ # nnn
ripgrep fd wget nodejs yarn mosh w3m urlview nmap gnupg youtube-dl ffmpeg ispell aspell aspellDicts . en aspellDicts . en-computers aspellDicts . en-science aspellDicts . fr aspellDicts . de aspellDicts . eo aspellDicts . es hexyl entr httpie cacert catimg tealdeer ffsend du-dust duplicati python3 bitwarden-cli rage sd bottom magic-wormhole
] ;
{
home . packages = with pkgs ; [
ripgrep fd wget nodejs deno yarn cargo mosh w3m bombadillo nnn urlview gnupg hexyl httpie cacert catimg tealdeer du-dust duplicati bitwarden-cli rage sd bottom magic-wormhole eva glow restic tig gitui pastel spotify-tui manix
ispell aspell aspellDicts . en aspellDicts . en-computers aspellDicts . en-science aspellDicts . fr aspellDicts . de aspellDicts . eo aspellDicts . es
] ;
home . sessionVariables = {
EDITOR = " v i m " ;
MANPAGER = " s h - c ' c o l - b x | b a t - l m a n - p ' " ;
PATH = " $ P A T H : ${ builtins . getEnv " H O M E " } / . e m a c s . d / b i n : ${ builtins . getEnv " H O M E " } / . r a d i c l e / b i n : ${ builtins . getEnv " H O M E " } / . c a r g o / b i n " ;
PATH = " $ P A T H : ${ builtins . getEnv " H O M E " } / . e m a c s . d / b i n : ${ builtins . getEnv " H O M E " } / . c a r g o / b i n " ;
EXA_ICON_SPACING = 2 ;
} ;
@ -55,6 +54,10 @@ in
enableAliases = true ;
} ;
programs . zoxide = {
enableZshIntegration = true ;
} ;
programs . zsh = {
enable = true ;
enableAutosuggestions = true ;
@ -89,11 +92,6 @@ in
fileWidgetOptions = [ " - - m i n - h e i g h t 3 0 - - p r e v i e w - w i n d o w n o b o r d e r - - p r e v i e w ' ( b a t - - s t y l e = n u m b e r s , c h a n g e s - - w r a p n e v e r - - c o l o r a l w a y s { } | | c a t { } | | t r e e - C { } ) 2 > / d e v / n u l l ' " ] ;
} ;
programs . broot = {
enable = true ;
enableZshIntegration = true ;
} ;
programs . ssh = {
enable = true ;
matchBlocks = {
@ -120,12 +118,18 @@ in
userName = " D u s t i n S w a n " ;
userEmail = " d u s t i n @ d u s t i n s w a n . c o m " ;
signing = {
# signByDefault = true ;
signByDefault = true ;
key = " A D 1 1 7 5 0 1 5 1 C 1 0 8 8 1 9 7 0 B D 9 4 3 A B 4 9 B D 6 B 2 B 3 A 6 3 7 7 " ;
} ;
aliases = { # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git
lg = " l o g - - c o l o r - - g r a p h - - p r e t t y = f o r m a t : ' % C r e d % h % C r e s e t - % C ( y e l l o w ) % d % C r e s e t % s % C g r e e n ( % c r ) % C ( b o l d b l u e ) < % a n > % C r e s e t ' - - a b b r e v - c o m m i t " ;
} ;
delta = {
enable = true ;
options = {
syntax-theme = " N o r d " ;
} ;
} ;
} ;
programs . emacs = {
@ -137,15 +141,88 @@ in
enable = true ;
viAlias = true ;
vimAlias = true ;
vimdiffAlias = true ;
withNodeJs = true ;
withPython3 = true ;
# unimpaired endwise textobj-word-column MatchTag vim-matchmaker vim-vertical-move stdtabs matchit splitjoin vimade fuzzymenu vim-markdown
plugins = with pkgs . vimPlugins ; [ nord-vim vim-airline vim-airline-themes vim-sensible vim-repeat vim-surround vim-fugitive vim-speeddating jdaddy-vim ale vim-snippets fzf-vim vim-tmux-navigator vim-multiple-cursors vim-easymotion vim-sneak nerdcommenter emmet-vim undotree vim-signature vim-easy-align vim-better-whitespace vim-signify vim-expand-region vim-exchange argtextobj-vim goyo vim-orgmode vim-polyglot vim-devicons vim-startify vim-abolish vim-peekaboo vim-table-mode tabular coc-nvim coc-css coc-html coc-eslint coc-tsserver coc-json coc-fzf coc-snippets vim-highlightedyank vim-which-key vim-floaterm ] ;
plugins = with pkgs . vimPlugins ; [
vim-repeat ale vim-snippets vim-signify vim-orgmode vim-devicons vim-startify vim-highlightedyank
emmet-vim # <ctrl-y>,
vim-signature # marks in the gutter; mx (add), dmx (delete), m, (place next available), m. (next available if empty), m- (delete all on line), m<space> (delete all)
vim-expand-region # + / - to select increasingly larger / smaller regions∑
vim-better-whitespace # :StripWhitespace
vim-peekaboo # see registers when doing " @ and ctrl-r
vim-abolish # Substitution: :Subvert/child{,ren}/adult{,s}/g Coercios: crs (coerce to snake-case), crm (mixed), crc (camel), cru (upper), cr- (dash), cr., cr<space>, crt (title-case)
vim-polyglot # includes sensible, dups vim-sleuth
argtextobj-vim # daa => delete an argument
splitjoin-vim # gS / gJ to turn single-line code into multi, etc.
MatchTagAlways # highlights the matching & surrounding tags
vim-visual-multi # ctrl-n on word, n/N to select next/prev, [/] to switch cursors, q to skip, Q to remove current
vim-endwise # automatically add end block keyword or symbol
vim-fugitive # Git, Gdiff, Gblame, Gstatus, Gcommit
vim-speeddating # ctrl-a & ctrl-x on dates
jdaddy-vim # cij: change inner json. gqaj: pretty print json
vim-surround # cs[{ -> change surrounding [ to {, cst -> change surrounding tag, ysiw] -> surround inner word with ], etc.
vim-tmux-navigator # ctrl-l -> right in vim splits then tmux panes, etc.
vim-sneak # stp -> jump to next occurance of 'tp'. ; -> next. , -> go back, `` -> back home
fzf-vim
vim-table-mode # <space>tm, || for rule, <space>tt -> tableize csv
tabular # :Tabularize /, :Tabu (shortcut & guess the right thing)
vim-markdown # zr, zR, zm, zM, za, zA, zc, zC for folding
coc-nvim coc-css coc-html coc-eslint coc-tsserver coc-json coc-fzf coc-snippets
{
plugin = vim-easy-align ; # gaip= -> align inner paragraph on first =, gaip*= -> align aroud all =
config = ''
xmap ga <Plug> ( EasyAlign )
nmap ga <Plug> ( EasyAlign )
'' ;
}
{
plugin = vim-easymotion ; # <leader><leader> w, <leader><leader>fx -> find x
config = " l e t g : E a s y M o t i o n _ s m a r t c a s e = 1 " ;
}
{
plugin = nerdcommenter ; # toggle: <leader>c<space>, comment: <leader>cc
config = " l e t g : N E R D S p a c e D e l i m s = 1 " ;
}
{
plugin = vim-floaterm ;
config = " n n o r e m a p < s i l e n t > < l e a d e r > T : F l o a t e r m N e w < C R > " ;
}
{
plugin = vim-which-key ;
config = " n n o r e m a p < s i l e n t > < l e a d e r > : W h i c h K e y ' < S p a c e > ' < C R > " ;
}
{
plugin = goyo ;
config = " n m a p < s i l e n t > < l e a d e r > G : G o y o < c r > " ;
}
{
plugin = vim-airline ;
config = ''
let g:airline #extensions#tabline#enabled = 1
let g:airline #extensions#ale#enabled = 1
let g:airline_powerline_fonts = 1
'' ;
}
vim-airline-themes
{
plugin = nord-vim ;
config = ''
colorscheme nord
let g:nord_italic = 1
let g:nord_underline = 1
'' ;
}
{
plugin = undotree ;
config = " n n o r e m a p < l e a d e r > u : U n d o t r e e T o g g l e < c r > " ;
}
] ;
extraConfig = ''
set expandtab
set tabstop = 2
set softtabstop = 2
set shiftwidth = 2
" s e t e x p a n d t a b " insert spaces when tab is pressed
" s e t t a b s t o p = 2
" s e t s o f t t a b s t o p = 2
" s e t s h i f t w i d t h = 2
set hidden
set number
@ -156,38 +233,17 @@ in
let mapleader = " \< S p a c e > "
let maplocalleader = " \\ "
nnoremap <silent> <leader> : WhichKey ' <Space> ' <CR>
let g:EasyMotion_smartcase = 1
let g:NERDSpaceDelims = 1
let g:coc_snippet_next = ' <tab> '
let g:coc_snippet_prev = ' <S-Tab> '
let g:airline #extensions#tabline#enabled = 1
let g:airline #extensions#ale#enabled = 1
let g:airline_powerline_fonts = 1
" l e t g : a l e _ f i x e r s = { ' p h p ' : [ ' p h p - c s - f i x e r ' ] }
let g:nord_italic = 1
" l e t g : n o r d _ i t a l i c _ c o m m e n t s = 1
let g:nord_underline = 1
colorscheme nord
highlight Folded cterm = italic , bold ctermbg = 0 ctermfg = 12 guibg = #3B4252 guifg=#81A1C1
let g:org_indent = 1
nnoremap <silent> <leader> p4 : ! p4 edit % <cr>
nnoremap <silent> <leader> / : noh <cr>
nnoremap <leader> v <c-w> v <c-w> l
nnoremap <leader> s <c-w> s <c-w> j
nnoremap <leader> u : UndotreeToggle <cr>
xmap ga <Plug> ( EasyAlign )
nmap ga <Plug> ( EasyAlign )
nnoremap <silent> <leader> a : A g<CR>
nnoremap <silent> <leader> a : Rg <CR>
nnoremap <silent> <leader> f : Files <CR>
nnoremap <silent> <leader> b : Buffers <CR>
nnoremap <silent> <leader> w : Windows <CR>
@ -208,13 +264,16 @@ in
imap <c-x> <c-f> <plug> ( fzf-complete-path )
imap <c-x> <c-j> <plug> ( fzf-complete-file-ag )
imap <c-x> <c-l> <plug> ( fzf-complete-line )
nnoremap <silent> <leader> n : FloatermNew nnn <CR>
nnoremap <silent> <leader> T : FloatermNew <CR>
'' ;
} ;
programs . bat . enable = true ;
programs . bat = {
enable = true ;
config = {
theme = " N o r d " ;
} ;
} ;
programs . gpg . enable = true ;
programs . mpv . enable = true ;
programs . jq . enable = true ;