Depot cannot be stopped and neither can I

This commit is contained in:
kat witch 2021-08-09 02:41:43 +01:00
parent 1f613c6fb7
commit 01460123a6
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
256 changed files with 15 additions and 15 deletions

View file

@ -1,14 +0,0 @@
{ config, ... }:
{
base16 = {
shell.enable = true;
schemes = [ "tomorrow.tomorrow-night-eighties" "tomorrow.tomorrow" ];
alias.light = "tomorrow.tomorrow";
alias.dark = "tomorrow.tomorrow-night-eighties";
};
# home.base16-shell = {
# enable = true;
# defaultTheme = "rebecca.rebecca";
# };
}

View file

@ -1,22 +0,0 @@
{ ... }:
{
imports = [
./vim
./zsh.nix
./git.nix
./kitty.nix
./tmux.nix
./base16.nix
./xdg.nix
./ssh.nix
./packages.nix
./weechat.nix
./inputrc.nix
./rink.nix
./pass.nix
./secrets.nix
];
home.stateVersion = "20.09";
}

View file

@ -1,31 +0,0 @@
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
git-crypt
gitAndTools.gitRemoteGcrypt
gitAndTools.gitAnnex
git-revise
gitAndTools.git-annex-remote-b2
];
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "kat witch";
userEmail = "kat@kittywit.ch";
extraConfig = {
init = { defaultBranch = "main"; };
protocol.gcrypt.allow = "always";
annex = {
autocommit = false;
backend = "BLAKE2B512";
synccontent = true;
};
};
signing = {
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
signByDefault = true;
};
};
}

View file

@ -1,21 +0,0 @@
{ config, ... }:
{
xdg.configFile."inputrc".text = ''
set editing-mode vi
set keyseq-timeout 1
set mark-symlinked-directories on
set completion-prefix-display-length 8
set show-all-if-ambiguous on
set show-all-if-unmodified on
set visible-stats on
set colored-stats on
set bell-style audible
set meta-flag on
set input-meta on
set convert-meta off
set output-meta on
'';
home.sessionVariables.INPUTRC = "${config.xdg.configHome}/inputrc";
}

View file

@ -1,6 +0,0 @@
{ config, pkgs, ... }:
{
# home.sessionVariables.TERMINFO_DIRS =
# "${pkgs.kitty.terminfo.outPath}/share/terminfo";
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

View file

@ -1,27 +0,0 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
tmate
htop
fd
sd
duc
bat
exa
socat
rsync
wget
ripgrep
nixpkgs-fmt
pv
progress
zstd
file
whois
niv
dnsutils
borgbackup
neofetch
];
}

View file

@ -1,12 +0,0 @@
{ config, pkgs, ... }:
{
programs.password-store = {
enable = true;
package = pkgs.pass-wayland.withExtensions (exts: [ exts.pass-otp exts.pass-import ]);
settings = {
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store";
PASSWORD_STORE_CLIP_TIME = "60";
};
};
}

View file

@ -1,38 +0,0 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
rink-readline
];
xdg.configFile."rink/config.toml".text = lib.toTOML {
colors = {
enabled = true;
theme = "my_theme";
};
currency = {
cache_duration = "1h";
enabled = true;
endpoint = "https://rinkcalc.app/data/currency.json";
timeout = "2s";
};
rink = {
long_output = true;
prompt = "> ";
};
themes = {
my_theme = {
date_time = "default";
doc_string = "italic";
error = "red";
number = "default";
plain = "default";
pow = "default";
prop_name = "cyan";
quantity = "dimmed cyan";
unit = "cyan";
user_input = "bold";
};
};
};
}

View file

@ -1,9 +0,0 @@
{ config, lib, ... }:
{
secrets = {
persistentRoot = config.xdg.cacheHome + "/kat/secrets";
external = true;
};
}

View file

@ -1,27 +0,0 @@
{ config, pkgs, lib, ... }:
{
programs.ssh = {
enable = true;
controlMaster = "auto";
controlPersist = "10m";
hashKnownHosts = true;
matchBlocks =
let
common = {
forwardAgent = true;
extraOptions = {
RemoteForward =
"/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra";
};
port = 62954;
};
in
{
"athame" = { hostname = "athame.kittywit.ch"; } // common;
"samhain" = { hostname = "192.168.1.135"; } // common;
"yule" = { hostname = "192.168.1.92"; } // common;
"ostara" = { hostname = "192.168.1.245"; } // common;
};
};
}

View file

@ -1,52 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
{
programs.zsh.shellAliases = {
tt = "tmux new -AD -s";
};
programs.tmux = {
enable = true;
terminal = "tmux-256color";
keyMode = "vi";
baseIndex = 1;
extraConfig = with mapAttrs (_: v: "colour${toString v}") pkgs.base16.shell.shell256; ''
# proper title handling
set -g set-titles on
set -g set-titles-string "#T"
set -ga terminal-overrides ",xterm-256color:Tc"
# modes
setw -g clock-mode-colour colour8
setw -g mode-style 'fg=${base07} bg=${base02} bold'
# panes
set -g pane-border-style 'fg=${base06} bg=${base02}'
set -g pane-active-border-style 'bg=${base0D} fg=${base07}'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=${base00} fg=${base06}'
set -g status-left '#[fg=${base06} bg=${base01}] #S@#h '
set -g status-right '#[fg=${base07},bg=${base01}] %F #[fg=${base07},bg=${base02}] %H:%M:%S %Z '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=${base07} bg=${base0D} bold'
setw -g window-status-current-format ' #I#[fg=${base07}]:#[fg=${base07}]#W#[fg=${base07}]#F '
setw -g window-status-style 'fg=${base06} bg=${base03}'
setw -g window-status-format ' #I#[fg=${base07}]:#[fg=${base06}]#W#[${base06}]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# messages
set -g message-style 'fg=colour232 bg=colour16 bold'
# mouse
set -g mouse on
'';
};
}

View file

@ -1,59 +0,0 @@
{ config, lib, pkgs, ... }:
{
home.sessionVariables.EDITOR = "vim";
programs.vim = {
enable = true;
settings = {};
package = pkgs.vim_configurable-pynvim;
#withPython3 = true;
plugins = with pkgs.vimPlugins; [
nerdtree
vim-nix
rust-vim
coc-nvim
coc-rust-analyzer
coc-yank
coc-python
coc-json
coc-yaml
coc-git
coc-css
coc-html
vim-fugitive
vim-startify
vim-airline
vim-airline-themes
vim-lastplace
base16-vim
];
#extraPackages = with pkgs;
# [ (python3.withPackages (ps: with ps; [ black flake8 ])) ];
#extraPython3Packages = (ps: with ps; [ jedi pylint ]);
extraConfig = import ./vimrc.nix { inherit pkgs config; };
};
xdg.dataFile = {
"vim/undo/.keep".text = "";
"vim/swap/.keep".text = "";
"vim/backup/.keep".text = "";
};
xdg.configFile = {
"vim/coc/coc-settings.json".text = builtins.toJSON {
"rust.rustfmt_path" = "${pkgs.rustfmt}/bin/rustfmt";
"rust-analyzer.serverPath" = "rust-analyzer";
"rust-analyzer.updates.prompt" = false;
"rust-analyzer.notifications.cargoTomlNotFound" = false;
"rust-analyzer.notifications.workspaceLoaded" = false;
"rust-analyzer.procMacro.enable" = true;
"rust-analyzer.cargo.loadOutDirsFromCheck" = true;
"rust-analyzer.cargo-watch.enable" =
true; # TODO: want some way to toggle this on-demand?
"rust-analyzer.completion.addCallParenthesis" =
false; # consider using this?
"rust-analyzer.hoverActions.linksInHover" = true;
"rust-analyzer.diagnostics.disabled" = [
"inactive-code" # it has strange cfg support..?
];
};
};
}

View file

@ -1,205 +0,0 @@
{ config, pkgs }:
''
source ${pkgs.writeText "vimrc" ''
set encoding=utf-8
scriptencoding utf-8
set list listchars=tab:»\ ,extends:,precedes:,nbsp:·,trail:
''}";
" Enable mouse
set mouse=a
set ttymouse=sgr
set viminfo='100000,<100000,s1000,h,n$XDG_DATA_HOME/vim/viminfo
" colors
let base16colorspace=256
colorscheme base16-default-dark
" tabline
let g:airline#extensions#tabline#enabled = 1
" notmuch!
let g:notmuch_config_file='${config.xdg.configHome}/notmuch/notmuchrc'
let g:notmuch_folders_count_threads=0
let g:notmuch_date_format='%y-%m-%d %H:%M'
let g:notmuch_datetime_format='%y-%m-%d %H:%M'
let g:notmuch_show_date_format='%Y/%m/%d %H:%M'
let g:notmuch_search_date_format='%Y/%m/%d %H:%M'
let g:notmuch_html_converter='${pkgs.elinks}/bin/elinks --dump'
" lastplace
let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit"
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
\ quit | endif
autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
let g:coc_node_path='${pkgs.nodejs}/bin/node'
let g:coc_config_home=$XDG_CONFIG_HOME . '/vim/coc'
set undodir=$XDG_DATA_HOME/vim/undo
set directory=$XDG_DATA_HOME/vim/swap//
set backupdir=$XDG_DATA_HOME/vim/backup
set ttimeoutlen=100
set number
set hidden
set nobackup
set nowritebackup
set cmdheight=2
set updatetime=300
set cursorline
set colorcolumn=100
set linebreak showbreak= "
set hlsearch
set relativenumber
set completeopt=longest,menuone
command Spaces set expandtab
command Tabs set noexpandtab
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
noremap <silent><expr> <C-cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" GoTo code navigation.
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>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')
" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function',''')}
" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
'' + (if config.wayland.windowManager.sway.enable then ''
noremap "+y y:call system("wl-copy", @")<CR>
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', ''', 'g')<CR>p
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', ''', 'g')<CR>p
'' else
"")

View file

@ -1,182 +0,0 @@
{ config, pkgs, lib, ... }:
with lib;
{
programs.weechat = {
init = lib.mkMerge [
(lib.mkBefore ''
/server add espernet athame.kittywit.ch/5001 -ssl -autoconnect
/matrix server add kittywitch kittywit.ch
/key bind meta-g /go
/key bind meta-v /input jump_last_buffer_displayed
/key bind meta-c /buffer close
/key bind meta-n /bar toggle nicklist
/key bind meta-b /bar toggle buflist
/relay add weechat 9000
'')
(lib.mkAfter ''
/matrix connect kittywitch
/window splith +10
/window 2
/buffer highmon
/window 1
'')
];
homeDirectory = "${config.xdg.dataHome}/weechat";
plugins.python = {
enable = true;
packages = [ "weechat-matrix" ];
};
plugins.perl = {
enable = true;
};
scripts = with pkgs.weechatScripts; [
go
auto_away
autosort
colorize_nicks
unread_buffer
urlgrab
vimode-git
weechat-matrix
title
highmon
];
config = with mapAttrs (_: toString) pkgs.base16.shell.shell256; {
logger.level.irc = 0;
logger.level.python.matrix = 0;
logger.level.core.weechat = 9;
buflist = {
format = {
indent = "\${if:\${merged}?\${if:\${buffer.prev_buffer.number}!=\${buffer.number}?:\${if:\${buffer.next_buffer.number}==\${buffer.number}?:\${if:\${buffer.next_buffer.name}=~^server||\${buffer.next_buffer.number}<0?:}}}:\${if:\${buffer.active}>0?\${if:\${buffer.next_buffer.name}=~^server?:\${if:\${buffer.next_buffer.number}>0?:}}:\${if:\${buffer.next_buffer.name}=~^server? :}}}";
buffer_current = "\${color:,${base0D}}\${format_buffer}";
hotlist = " \${color:${base0B}}(\${hotlist}\${color:${base0B}})";
hotlist_highlight = "\${color:${base08}}";
hotlist_low = "\${color:${base06}}";
hotlist_message = "\${color:${base0C}}";
hotlist_none = "\${color:${base06}}";
hotlist_private = "\${color:${base09}}";
hotlist_separator = "\${color:${base04}},";
number = "\${color:${base07}}\${number}\${if:\${number_displayed}?.: }";
};
};
weechat = {
look = {
mouse = true;
separator_horizontal = "";
read_marker_string = "";
prefix_same_nick = "";
};
color = {
chat_nick_self = base0E;
separator = base06;
chat_read_marker = base0B;
chat_read_marker_bg = base03;
};
bar = {
buflist = {
size_max = 24;
color_delim = base0E;
};
input = {
items = "[input_prompt]+(away),[input_search],[input_paste],input_text,[vi_buffer]";
color_delim = base0E;
conditions = "\${window.buffer.full_name} != perl.highmon";
};
nicklist = {
size_max = 18;
color_delim = base0E;
};
status = {
color_bg = base02;
color_fg = base06;
color_delim = base0E;
items = "[time],mode_indicator,[buffer_last_number],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+matrix_typing_notice+buffer_zoom+buffer_filter,scroll,[lag],[hotlist],completion,cmd_completion";
conditions = "\${window.buffer.full_name} != perl.highmon";
};
title = {
color_bg = base02;
color_fg = base06;
color_delim = base0E;
conditions = "\${window.buffer.full_name} != perl.highmon";
};
};
};
urlgrab.default.copycmd = "${pkgs.wl-clipboard}/bin/wl-copy";
plugins.var = {
python = {
title = {
title_prefix = "weechat - ";
show_hotlist = true;
current_buffer_suffix = " [";
title_suffix = " ]";
};
vimode = {
copy_clipboard_cmd = "wl-copy";
paste_clipboard_cmd = "wl-paste --no-newline";
imap_esc_timeout = "100";
search_vim = true;
user_mappings = builtins.toJSON {
"," = "/buffer #{1}<CR>";
"``" = "/input jump_last_buffer_displayed<CR>";
"`n" = "/input jump_smart<CR>";
"k" = "/input history_previous<CR>";
"j" = "/input history_next<CR>";
"p" = "a/input clipboard_paste<ICMD><ESC>";
"P" = "/input clipboard_paste<CR>";
#"u" = "/input undo<CR>";
#"\\x01R" = "/input redo<CR>";
"\\x01K" = "/buffer move -1<CR>";
"\\x01J" = "/buffer move +1<CR>";
};
user_mappings_noremap = builtins.toJSON {
"\\x01P" = "p";
"/" = "i/";
};
user_search_mapping = "?";
mode_indicator_cmd_color_bg = base01;
mode_indicator_cmd_color = base04;
mode_indicator_insert_color_bg = base01;
mode_indicator_insert_color = base04;
mode_indicator_normal_color_bg = base01;
mode_indicator_normal_color = base04;
mode_indicator_replace_color_bg = base01;
mode_indicator_replace_color = base0E;
mode_indicator_search_color_bg = base0E;
mode_indicator_search_color = base04;
no_warn = true;
};
notify_send.icon = "";
go.short_name = true;
};
perl.highmon = {
short_names = "on";
output = "buffer";
merge_private = "on";
alignment = "nchannel,nick";
};
};
irc = {
look = {
server_buffer = "independent";
color_nicks_in_nicklist = true;
};
};
matrix = {
network = {
max_backlog_sync_events = 30;
lazy_load_room_users = true;
autoreconnect_delay_max = 5;
lag_min-show = 1000;
};
look = {
server_buffer = "independent";
redactions = "notice";
};
};
};
};
}

View file

@ -1,18 +0,0 @@
{ config, lib, ... }:
{
xdg = {
enable = true;
userDirs = {
enable = true;
pictures = "$HOME/media";
videos = "$HOME/media/videos";
documents = "$HOME/docs";
download = "$HOME/downloads";
desktop = "$HOME/tmp";
templates = "$HOME/tmp";
publicShare = "$HOME/shared";
music = "$HOME/media-share/music";
};
};
}

View file

@ -1,101 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
shellFunAlias = command: replacement: ''
if [[ ! -t 0 ]]; then
command ${command} $@
else
echo 'use ${replacement}!'
fi
'';
shellFunAliases = mapAttrs shellFunAlias;
in {
home.shell.functions = {
genmac = ''
nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/'
'';
nano = ''
${pkgs.wezterm}/bin/wezterm imgcat ${./nano.png}
'';
} // shellFunAliases {
sed = "sd";
find = "fd";
grep = "rg";
};
xdg.dataFile = { "z/.keep".text = ""; };
home.packages = with pkgs; [ fzf fd zsh-completions akiflags ];
programs.zsh = {
enable = true;
enableAutosuggestions = true;
initExtra = let
zshOpts= [
"auto_pushd" "pushd_ignore_dups" "pushdminus"
"rmstarsilent" "nonomatch" "long_list_jobs" "interactivecomments"
"append_history" "hist_ignore_space" "hist_verify" "inc_append_history" "nosharehistory"
"nomenu_complete" "auto_menu" "no_auto_remove_slash" "complete_in_word" "always_to_end" "nolistbeep" "autolist" "listrowsfirst"
]; in ''
zmodload -i zsh/complist
zstyle ':completion:*' list-colors ""
zstyle ':completion:*:*:*:*:*' menu select
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
zstyle ':completion:*:complete:pass:*:*' matcher 'r:|[./_-]=** r:|=*' 'l:|=* r:|=*'
${lib.concatStringsSep "\n" (map (opt: "setopt ${opt}") zshOpts)}
source ${./zshrc-vimode}
echo ""; akiflags -rb;
'';
shellAliases = {
nixdirfmt = "fd --color=never .nix | xargs nixpkgs-fmt";
exa = "exa --time-style long-iso";
ls = "exa -G";
la = "exa -Ga";
ll = "exa -l";
lla = "exa -lga";
sys = "systemctl";
log = "journalctl";
dmesg = "dmesg -HP";
lg = "log --no-pager | grep";
};
localVariables = {
_Z_DATA = "${config.xdg.dataHome}/z/data";
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=3,bold";
ZSH_AUTOSUGGEST_USE_ASYNC = 1;
};
plugins = [
(with pkgs.zsh-syntax-highlighting; {
name = "zsh-syntax-highlighting";
inherit src;
})
{
name = "z";
file = "z.sh";
src = pkgs.fetchFromGitHub {
owner = "rupa";
repo = "z";
rev = "9d5a3fe0407101e2443499e4b95bca33f7a9a9ca";
sha256 = "0aghw6zmd3851xpzgy0jkh25wzs9a255gxlbdr3zw81948qd9wb1";
};
}
{
name = "fzf-z";
src = pkgs.fetchFromGitHub {
owner = "andrewferrier";
repo = "fzf-z";
rev = "089ba6cacd3876c349cfb6b65dc2c3e68b478fd0";
sha256 = "1lvvkz0v4xibq6z3y8lgfkl9ibcx0spr4qzni0n925ar38s20q81";
};
}
];
};
programs.starship = {
enable = true;
enableZshIntegration = true;
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
};
}

View file

@ -1,114 +0,0 @@
zle-keymap-select() {
zle reset-prompt
zle -R
}
TRAPWINCH() {
zle && { zle reset-prompt; zle -R }
}
zle -N zle-keymap-select
zle -N edit-command-line
bindkey -v
autoload -Uz edit-command-line
bindkey "^?" backward-delete-char
bindkey -M vicmd 'V' edit-command-line
# tab completion menu
bindkey -M menuselect "k" up-line-or-history
bindkey -M menuselect "j" down-line-or-history
bindkey -M menuselect "l" forward-char
bindkey -M menuselect "h" backward-char
bindkey -M menuselect "^[" undo
# silence bell when pressing escape too much
bindkey -M vicmd -s "\e" ''
# make W/B/E/dW/dB/dE move over entire shell arguments, customize w/b/e with wordchars
autoload -U forward-word-match # TODO: acts weirdly when moving between words, like "a/b", 'w' command should move cursor to the "/", not the "b"
autoload -U backward-word-match
autoload -U match-words-by-style
forward-blank-word-end-match() {
local curcontext=":zle:$WIDGET" start=$CURSOR offset=1
local -A matched_words
integer count=${NUMERIC:-1}
if (( count < 0 )); then
(( NUMERIC = -count ))
zle ${WIDGET/forward/backward}
return
fi
if zstyle -t "$curcontext" virangeflag; then
offset=0
fi
while (( count-- )); do
# weird behaviour if not called from the beginning of a word, so go backwards first
match-words-by-style
if (( ${#matched_words[word-before-cursor]} > 0 && ${#matched_words[ws-before-cursor]} == 0 )); then
(( CURSOR -= ${#matched_words[word-before-cursor]} ))
fi
match-words-by-style
if (( ${#matched_words[ws-after-cursor]} > 0 )); then
(( CURSOR += ${#matched_words[ws-after-cursor]} ))
fi
if (( ${#matched_words[word-after-cursor]} > 0 )); then
(( CURSOR += ${#matched_words[word-after-cursor]} - offset ))
fi
if (( CURSOR <= start )); then
if (( ${#matched_words[ws-after-word]} > 0 )); then
(( CURSOR += ${#matched_words[ws-after-word]} + 1 ))
fi
match-words-by-style
if (( ${#matched_words[word-after-cursor]} > 0 )); then
(( CURSOR += ${#matched_words[word-after-cursor]} - offset ))
else
return 1
fi
fi
done
return 0
}
zle -N forward-end-word-parameter forward-blank-word-end-match
zle -N forward-end-word-normal forward-blank-word-end-match
zle -N forward-end-viopp-word-parameter forward-blank-word-end-match
zle -N forward-end-viopp-word-normal forward-blank-word-end-match
zle -N forward-word-parameter forward-word-match
zle -N forward-word-normal forward-word-match
zle -N backward-word-parameter backward-word-match
zle -N backward-word-normal backward-word-match
zle -N forward-word-normal forward-word-match
zle -N backward-word-normal backward-word-match
bindkey -M vicmd "W" forward-word-parameter
bindkey -M vicmd "B" backward-word-parameter
bindkey -M vicmd "E" forward-end-word-parameter
bindkey -M vicmd "e" forward-end-word-normal
bindkey -M vicmd "w" forward-word-normal
bindkey -M vicmd "b" backward-word-normal
bindkey -M viopp "e" forward-end-viopp-word-normal
bindkey -M viopp "E" forward-end-viopp-word-parameter
zstyle ':zle:*-viopp-*' virangeflag 1
zstyle ':zle:*-word-parameter' word-style shell
zstyle ':zle:*-word-normal' word-style normal
zstyle ':zle:*-word-normal' word-chars "$WORDCHARS"
# zstyle ':zle:*' skip-whitespace-first false