Apparently, depot could be stopped. Who knew?

This commit is contained in:
kat witch 2021-08-18 02:25:15 +01:00
parent c3fe9a355e
commit b383c70492
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
196 changed files with 21 additions and 21 deletions

View file

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

View file

@ -0,0 +1,21 @@
{ ... }:
{
imports = [
./vim
./zsh.nix
./git.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

@ -0,0 +1,31 @@
{ 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

@ -0,0 +1,21 @@
{ 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";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View file

@ -0,0 +1,27 @@
{ 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

@ -0,0 +1,12 @@
{ 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

@ -0,0 +1,38 @@
{ 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

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

View file

@ -0,0 +1,24 @@
{ meta, 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
(lib.foldAttrList (map (network:
lib.mapAttrs (_: v: { hostname = v.address; } // common) (lib.filterAttrs (_: v: v.enable ) (lib.mapAttrs (_: v: v.network.addresses.${network}.ipv4) meta.network.nodes))
) ["private" "public"]));
};
}

View file

@ -0,0 +1,52 @@
{ 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

@ -0,0 +1,59 @@
{ 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;
"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

@ -0,0 +1,209 @@
{ 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
autocmd vimenter * highlight Normal guibg=NONE ctermbg=NONE
autocmd SourcePost * highlight Normal ctermbg=NONE guibg=NONE
\ | highlight LineNr ctermbg=NONE guibg=NONE
\ | highlight SignColumn ctermbg=NONE guibg=NONE
" 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

@ -0,0 +1,182 @@
{ 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

@ -0,0 +1,18 @@
{ 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

@ -0,0 +1,113 @@
{ 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}
bindkey '^ ' autosuggest-accept
autoload -Uz history-search-end
autoload -Uz history-beginning-search-menu
zle -N history-beginning-search-menu
zle -N history-beginning-search-backward-end \
history-search-end
zle -N history-beginning-search-forward-end \
history-search-end
bindkey "\e[5~" history-beginning-search-backward-end
bindkey "\e[6~" history-beginning-search-forward-end
bindkey "^p" history-beginning-search-menu
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";
hg = "history 0 | 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

@ -0,0 +1,114 @@
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

View file

@ -0,0 +1,27 @@
let katUser = { lib }: let
trustedImport = {
config.home-manager.users.kat = {
imports = lib.optional (builtins.pathExists ../../trusted/users/kat) (import ../../trusted/users/kat/home.nix);
};
}; userImport = profile: { config, ... }: {
config.home-manager.users.kat = {
imports = [
(./. + "/${profile}")
];
};
}; serviceImport = profile: { config, ... }: {
config.home-manager.users.kat = {
imports = [
(./services + "/${profile}")
];
};
}; profileNames = lib.folderList ./. ["base" "services"];
serviceNames = lib.folderList ./services [];
userProfiles = with userProfiles;
lib.genAttrs profileNames userImport // {
services = lib.genAttrs serviceNames serviceImport;
base = { imports = [ ./nixos.nix (userImport "base") trustedImport ]; };
server = { imports = [ personal ]; };
guiFull = { imports = [ gui sway dev media personal ]; };
}; in userProfiles;
in { __functor = self: katUser; isModule = false; }

View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ cookiecutter ];
home.shell.functions.katenv = ''
cookiecutter cookiecutters --directory $1
'';
}

View file

@ -0,0 +1,5 @@
{ config, lib, pkgs, ... }:
{
imports = [ ./packages.nix ./cookiecutter.nix ];
}

View file

@ -0,0 +1,5 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ hyperfine hexyl tokei ];
}

View file

@ -0,0 +1,5 @@
{ config, ... }:
{
imports = [ ./firefox ./packages.nix ./gtk.nix ./foot.nix ./xdg.nix ./ranger.nix ./fonts.nix ];
}

View file

@ -0,0 +1,196 @@
{ config, lib, pkgs, superConfig, ... }:
let
commonSettings = {
"app.update.auto" = false;
"identity.fxaccounts.account.device.name" = superConfig.networking.hostName;
"signon.rememberSignons" = false;
"browser.download.lastDir" = "/home/kat/downloads";
"browser.urlbar.placeholderName" = "DuckDuckGo";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"svg.context-properties.content.enabled" = true;
};
base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
config.lib.arc.base16.schemeForAlias.default;
in
{
programs.zsh.shellAliases = {
ff-pm = "firefox --ProfileManager";
ff-main = "firefox -P main";
};
programs.browserpass = {
enable = true;
browsers = [ "firefox" ];
};
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
};
home.file.".mozilla/tst.css".text = ''
/* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar. */
#tabbar { border: 0; overflow-y: scroll !important; }
/* Hide .twisty and adjust margins so favicons have 7px on left. */
.tab .twisty {
margin-left: -16px;
}
/* Push tab labels slightly to the right so they're completely hidden in collapsed state */
.tab .label {
margin-left: 7px;
}
/* Hide close buttons on tabs. */
.tab .closebox {
visibility: collapse;
}
/* Hide sound playing/muted button. */
.sound-button::before {
display: none !important;
}
/* Hide 'new tab' button. */
.newtab-button {
display: none;
}
/* ################################################ */
/* ##### COLOR THEME ############################## */
/* ################################################ */
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes pulse {
0% {
opacity: 0.75;
}
100% {
opacity: 0.25;
}
}
* {
font-family: "Cozette", monospace !important;
}
:root {
background-color: ${base16.base00} !important;
}
#tabbar {
background-color: ${base16.base00} !important;
border-right: 1px solid ${base16.base01};
box-shadow: none !important;
}
.tab {
background-color: ${base16.base01};
color: ${base16.base05} !important;
box-shadow: none !important;
margin: 0.125em;
border-radius: 0.125em;
}
.tab .favicon {
margin-left: 0.25em;
}
.tab .label {
margin: 0.25em;
}
.tab:hover {
background-color: ${base16.base0C}FF !important;
color: ${base16.base07} !important;
}
.tab.discarded {
background-color: ${base16.base00};
color: ${base16.base02} !important;
}
.tab.discarded:hover {
background-color: ${base16.base01} !important;
color: ${base16.base03} !important;
}
:root .tab .highlighter::before {
display: none;
}
.tab.active {
background-color: ${base16.base0D}FF;
color: ${base16.base07} !important;
}
.tab.active:hover {
background-color: ${base16.base0D}FF !important;
}
@keyframes rainbow_animation {
0% {
background-position: 0 0;
}
100% {
background-position: 100% 0;
}
}
/* Adjust style for tab that has sound playing. */
.tab.sound-playing .label {
background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: rainbow_animation 3s linear infinite;
animation-direction: alternate-reverse;
background-size: 400% 100%;
}
/* Adjust style for tab that is muted. */
.tab.muted {
opacity: 0.5;
}
'';
programs.firefox = {
enable = true;
package = pkgs.firefox-wayland;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
sponsorblock
floccus
link-cleaner
octotree
betterttv
canvasblocker
view-image
pkgs.nur.repos.crazazy.firefox-addons.new-tab-override
wappalyzer
auto-tab-discard
bitwarden
darkreader
decentraleyes
foxyproxy-standard
clearurls
df-youtube
old-reddit-redirect
privacy-badger
reddit-enhancement-suite
refined-github
stylus
temporary-containers
browserpass
tree-style-tab
multi-account-containers
ublock-origin
violentmonkey
];
profiles = {
main = {
id = 0;
isDefault = true;
settings = commonSettings // { };
userChrome = import ./userChrome.css.nix { profile = "main"; inherit base16; };
};
};
};
}

View file

@ -0,0 +1,106 @@
{ profile, base16 }:
''
* {
font-family: "Cozette", monospace;
}
:root {
--animationSpeed : 0.15s;
}
/* Hide main tabs toolbar */
#TabsToolbar {
visibility: collapse;
}
/* Hide splitter, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
display: none !important;
}
/* Hide sidebar header, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
visibility: collapse;
}
#back-button { display: none !important }
#forward-button { display: none !important }
#urlbar-search-mode-indicator { display: none !important }
#urlbar *|input::placeholder { opacity: 0 !important; }
#nav-bar, toolbar-menubar, #menubar-items, #main-menubar {
background: ${base16.base00} !important;
}
#urlbar-background {
background: ${base16.base01} !important;
}
#urlbar {
text-align: center;
}
#urlbar-container {
width: 50vw !important;
}
#star-button{
display:none;
}
#navigator-toolbox {
border : none !important;
}
.titlebar-spacer {
display : none !important;
}
#urlbar:not(:hover):not([breakout][breakout-extend]) > #urlbar-background {
box-shadow : none !important;
background : ${base16.base01} !important;
}
.urlbar-icon, #userContext-indicator, #userContext-label {
fill : transparent !important;
background : transparent !important;
color : transparent !important;
}
#nav-bar-customization-target > toolbarspring { max-width: none !important }
#urlbar:hover .urlbar-icon,
#urlbar:active .urlbar-icon,
#urlbar[focused] .urlbar-icon {
fill : var(--toolbar-color) !important;
}
#urlbar-container {
-moz-box-pack: center !important;
}
/* animations */
toolbarbutton,
.toolbarbutton-icon,
.subviewbutton,
#urlbar-background,
.urlbar-icon,
#userContext-indicator,
#userContext-label,
.urlbar-input-box,
#identity-box,
#tracking-protection-icon-container,
[anonid=urlbar-go-button],
.urlbar-icon-wrapper,
#tracking-protection-icon,
#identity-box image,
stack,
vbox,
tab:not(:active) .tab-background,
tab:not([beforeselected-visible])::after,
tab[visuallyselected] .tab-background::before,
tab[visuallyselected] .tab-background::before,
.tab-close-button {
transition : var(--animationSpeed) !important;
}
''

View file

@ -0,0 +1,5 @@
{ config, ... }:
{
fonts.fontconfig.enable = true;
}

View file

@ -0,0 +1,30 @@
{ config, lib, pkgs, ... }:
with lib;
let
witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
config.lib.arc.base16.schemeForAlias.default;
colors.ansi = builtins.concatStringsSep ", " (map (c: ''"#${c.hex.rgb}"'') (sublist 0 8 config.lib.arc.base16.schemeForAlias.default.shell.colours));
colors.brights = builtins.concatStringsSep ", " (map (c: ''"#${c.hex.rgb}"'') (sublist 8 8 config.lib.arc.base16.schemeForAlias.default.shell.colours));
in {
programs.foot = {
enable = true;
settings = {
main = {
term = "xterm-256color";
font = "${config.kw.font.name}:size=${toString config.kw.font.size}, Twitter Color Emoji:size=8";
font-bold = "${config.kw.font.name}:size=${toString config.kw.font.size}:style=Bold";
font-italic = "${config.kw.font.name}:size=${toString config.kw.font.size}:style=Italic";
font-bold-italic = "${config.kw.font.name}:size=${toString config.kw.font.size}:style=Bold Italic";
dpi-aware = "no";
};
colors = {
alpha = "0.9";
};
key-bindings = {
show-urls-copy = "Control+Shift+i";
};
};
};
}

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
{
gtk = {
enable = true;
iconTheme = {
name = "Numix-Square";
package = pkgs.numix-icon-theme-square;
};
theme = {
name = "Adementary-dark";
package = pkgs.adementary-theme;
};
};
}

View file

@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
_1password
bpytop
bitwarden
element-desktop
exiftool
thunderbird
mumble-develop
dino-omemo
transmission-remote-gtk
scrcpy
lm_sensors
p7zip
zip
unzip
nyxt
baresip
discord-nssfix
tdesktop
yubikey-manager
cryptsetup
];
}

View file

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
ranger
];
xdg.configFile."ranger/rc.conf".text = ''
set preview_images true
set preview_images_method iterm2
'';
}

View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
xdg-utils
];
}

View file

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
{
programs.beets = {
enable = true;
package = pkgs.beets;
settings = {
directory = "~/media-share/music";
library = "~/.local/share/beets.db";
plugins = lib.concatStringsSep " " [
"mpdstats"
"mpdupdate"
"duplicates"
"chroma"
];
};
};
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
imports = [
./mpv.nix
./obs.nix
./syncplay.nix
./beets.nix
./mpd.nix
./ncmpcpp.nix
./packages.nix
];
}

View file

@ -0,0 +1,41 @@
{ config, pkgs, ... }:
{
services.mpd = {
enable = true;
package = pkgs.mpd-youtube-dl;
network = {
startWhenNeeded = true;
listenAddress = "[::]";
};
musicDirectory = "/home/kat/media-share/music";
extraConfig = ''
max_output_buffer_size "32768"
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "pulse"
name "speaker"
}
audio_output {
bind_to_address "[::]"
type "httpd"
name "httpd-high"
encoder "opus"
bitrate "96000"
port "32101"
max_clients "4"
format "48000:16:2"
always_on "yes"
tags "yes"
}
'';
};
}

View file

@ -0,0 +1,111 @@
{ config, lib, pkgs, ... }:
{
programs.mpv = {
enable = true;
scripts = [ pkgs.mpvScripts.sponsorblock pkgs.mpvScripts.paused ];
bindings =
let
vim = {
"l" = "seek 5";
"h" = "seek -5";
"k" = "seek 60";
"j" = "seek -60";
"Ctrl+l" = "seek 1 exact";
"Ctrl+h" = "seek -1 exact";
"Ctrl+L" = "sub-seek 1";
"Ctrl+H" = "sub-seek -1";
"Ctrl+k" = "add chapter 1";
"Ctrl+j" = "add chapter -1";
"Ctrl+K" = "playlist-next";
"Ctrl+J" = "playlist-prev";
"Alt+h" = "frame-back-step";
"Alt+l" = "frame-step";
"`" = "cycle mute";
"MBTN_RIGHT" = "cycle pause";
"w" = "screenshot";
"W" = "screenshot video";
"Ctrl+w" = "screenshot window";
"Ctrl+W" = "screenshot each-frame";
"o" = "show-progress";
"O" = "script-message show_osc_dur 5";
"F1" = "cycle sub";
"F2" = "cycle audio";
"Ctrl+p" = "cycle video";
"L" = "add volume 2";
"H" = "add volume -2";
"Alt+H" = "add audio-delay -0.100";
"Alt+L" = "add audio-delay 0.100";
"1" = "set volume 10";
"2" = "set volume 20";
"3" = "set volume 30";
"4" = "set volume 40";
"5" = "set volume 50";
"6" = "set volume 60";
"7" = "set volume 70";
"8" = "set volume 80";
"9" = "set volume 90";
")" = "set volume 150";
"0" = "set volume 100";
"m" = "cycle mute";
"Ctrl+r" = "loadfile \${path}";
"Ctrl+R" = "video-reload";
"d" = "drop-buffers";
"Ctrl+d" = "quit";
};
other = {
"RIGHT" = vim."l";
"LEFT" = vim."h";
"UP" = vim."k";
"DOWN" = vim."j";
"Ctrl+0" = "set speed 1.0";
"Ctrl+=" = "multiply speed 1.1";
"Ctrl+-" = "multiply speed 1/1.1";
"Shift+LEFT" = vim."H";
"Shift+RIGHT" = vim."L";
"Ctrl+RIGHT" = vim."Ctrl+l";
"Ctrl+LEFT" = vim."Ctrl+h";
"Ctrl+Shift+LEFT" = vim."Ctrl+H";
"Ctrl+Shift+RIGHT" = vim."Ctrl+L";
"Ctrl+UP" = vim."Ctrl+k";
"Ctrl+DOWN" = vim."Ctrl+j";
"Ctrl+Shift+UP" = vim."Ctrl+K";
"Ctrl+Shift+DOWN" = vim."Ctrl+J";
"Alt+LEFT" = vim."Alt+h";
"Alt+RIGHT" = vim."Alt+l";
"SPACE" = vim."MBTN_RIGHT";
"m" = vim."`";
"WHEEL_UP" = vim."L";
"WHEEL_DOWN" = vim."H";
}; in vim // other;
config = {
no-input-default-bindings = "";
profile = "gpu-hq";
gpu-context = "wayland";
hwdec = "auto";
vo = "gpu";
volume-max = 200;
keep-open = true;
opengl-waitvsync = true;
demuxer-max-bytes = "2000MiB";
demuxer-max-back-bytes = "250MiB";
osd-scale-by-window = false;
osd-bar-h = 2.5; # 3.125 default
osd-border-size = 2; # font border pixels, default 3
term-osd-bar = true;
script-opts = lib.concatStringsSep ","
(lib.mapAttrsToList (k: v: "${k}=${toString v}") {
osc-layout = "slimbox";
osc-vidscale = "no";
osc-deadzonesize = 0.75;
osc-minmousemove = 4;
osc-hidetimeout = 2000;
osc-valign = 0.9;
osc-timems = "yes";
osc-seekbarstyle = "knob";
osc-seekbarkeyframes = "no";
osc-seekrangestyle = "slider";
});
};
};
}

View file

@ -0,0 +1,53 @@
{ config, pkgs, ... }:
{
programs.ncmpcpp = {
enable = true;
mpdMusicDir = "/home/kat/media-share/music";
package = pkgs.ncmpcpp-kat;
settings = {
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "my_fifo";
visualizer_in_stereo = "yes";
visualizer_type = "spectrum";
visualizer_look = "+|";
user_interface = "alternative";
colors_enabled = "yes";
discard_colors_if_item_is_selected = "no";
header_window_color = "250";
volume_color = "250";
state_line_color = "cyan";
state_flags_color = "cyan";
alternative_ui_separator_color = "yellow";
statusbar_color = "yellow";
progressbar_color = "black";
progressbar_elapsed_color = "blue";
window_border_color = "yellow";
playlist_display_mode = "classic";
song_columns_list_format =
"(3f)[cyan]{n} (40)[default]{t|f} (25)[red]{a} (30)[blue]{b} (4f)[cyan]{l}";
now_playing_prefix = "$b";
song_list_format =
" $7%n$9 $8-$9 $6%a$9 $8-$9 $5%b$9 $R $8%t$9 ($4%l$9) ";
song_library_format = "{%n > }{%t}|{%f}";
song_status_format = "{%a - }{%t - }{%b}";
titles_visibility = "no";
header_visibility = "no";
statusbar_visibility = "no";
now_playing_suffix = "$/b";
progressbar_look = " ";
media_library_primary_tag = "album_artist";
search_engine_display_mode = "columns";
};
bindings = [
{
key = "+";
command = "add";
}
{
key = "-";
command = "load";
}
];
};
}

View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
programs.obs-studio = {
enable = true;
package = pkgs.obs-studio-pipewire;
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
};
programs.zsh.shellAliases = { obs = "env QT_QPA_PLATFORM=xcb obs"; };
}

View file

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
gst_all_1.gstreamer.dev
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
imv
ffmpeg-full
youtube-dl
mkchromecast
v4l-utils
gimp-with-plugins
wf-recorder
];
}

View file

@ -0,0 +1,47 @@
{ config, lib, tf, ... }:
with lib;
{
kw.secrets = [
"syncplay-pass"
];
programs.syncplay = {
enable = true;
username = "kat";
defaultRoom = "lounge";
server = {
host = "sync.kittywit.ch";
password = tf.variables.syncplay-pass.ref;
};
playerArgs = [
"--ytdl-format=bestvideo[height<=1080]+bestaudio/best[height<=1080]/bestvideo+bestaudio/best"
];
# gui = false;
config = {
client_settings = {
onlyswitchtotrusteddomains = false;
autoplayrequiresamefiles = false;
readyatstart = true;
pauseonleave = false;
rewindondesync = false;
rewindthreshold = 6.0;
fastforwardthreshold = 6.0;
unpauseaction = "Always";
};
gui = {
#autosavejoinstolist = false;
showdurationnotification = false;
};
};
};
secrets.files.syncplay-config = {
text = config.programs.syncplay.configIni;
};
xdg.configFile."syncplay.ini" = mkForce {
source = config.lib.file.mkOutOfStoreSymlink config.secrets.files.syncplay-config.path;
};
}

View file

@ -0,0 +1,19 @@
{ config, pkgs, lib, ... }:
{
users.users.kat = {
uid = 1000;
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCocjQqiDIvzq+Qu3jkf7FXw5piwtvZ1Mihw9cVjdVcsra3U2c9WYtYrA3rS50N3p00oUqQm9z1KUrvHzdE+03ZCrvaGdrtYVsaeoCuuvw7qxTQRbItTAEsfRcZLQ5c1v/57HNYNEsjVrt8VukMPRXWgl+lmzh37dd9w45cCY1QPi+JXQQ/4i9Vc3aWSe4X6PHOEMSBHxepnxm5VNHm4PObGcVbjBf0OkunMeztd1YYA9sEPyEK3b8IHxDl34e5t6NDLCIDz0N/UgzCxSxoz+YJ0feQuZtud/YLkuQcMxW2dSGvnJ0nYy7SA5DkW1oqcy6CGDndHl5StOlJ1IF9aGh0gGkx5SRrV7HOGvapR60RphKrR5zQbFFka99kvSQgOZqSB3CGDEQGHv8dXKXIFlzX78jjWDOBT67vA/M9BK9FS2iNnBF5x6shJ9SU5IK4ySxq8qvN7Us8emkN3pyO8yqgsSOzzJT1JmWUAx0tZWG/BwKcFBHfceAPQl6pwxx28TM3BTBRYdzPJLTkAy48y6iXW6UYdfAPlShy79IYjQtEThTuIiEzdzgYdros0x3PDniuAP0KOKMgbikr0gRa6zahPjf0qqBnHeLB6nHAfaVzI0aNbhOg2bdOueE1FX0x48sjKqjOpjlIfq4WeZp9REr2YHEsoLFOBfgId5P3BPtpBQ== cardno:000612078454"
];
shell = pkgs.zsh;
extraGroups = [ "wheel" "video" "systemd-journal" "plugdev" ];
hashedPassword =
"$6$i28yOXoo$/WokLdKds5ZHtJHcuyGrH2WaDQQk/2Pj0xRGLgS8UcmY2oMv3fw2j/85PRpsJJwCB2GBRYRK5LlvdTleHd3mB.";
};
systemd.tmpfiles.rules = [
"f /var/lib/systemd/linger/kat"
];
}

View file

@ -0,0 +1,5 @@
{ ... }:
{
imports = [ ./gpg.nix ./packages.nix ./weechat.nix ./email.nix ./zsh.nix ];
}

View file

@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:
{
config = {
programs.notmuch = {
enable = true;
hooks = { preNew = "mbsync --all"; };
};
programs.mbsync.enable = true;
programs.msmtp.enable = true;
programs.vim.plugins = [ pkgs.vimPlugins.notmuch-vim ];
accounts.email = {
maildirBasePath = "${config.home.homeDirectory}/mail";
accounts.kat = {
address = "kat@kittywit.ch";
primary = true;
realName = "kat witch";
userName = "kat@kittywit.ch";
msmtp.enable = true;
mbsync.enable = true;
mbsync.create = "maildir";
notmuch.enable = true;
imap.host = "athame.kittywit.ch";
smtp.host = "athame.kittywit.ch";
passwordCommand = "${pkgs.pass}/bin/pass email/kittywitch";
gpg = {
signByDefault = true;
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
};
};
};
};
}

View file

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
{
home.sessionVariables = {
SSH_AUTH_SOCK =
"\${SSH_AUTH_SOCK:-$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)}";
};
services.gpg-agent = {
enable = true;
enableExtraSocket = true;
enableSshSupport = false;
pinentryFlavor = "gtk2";
extraConfig = lib.mkMerge [
"auto-expand-secmem 0x30000" # otherwise "gpg: public key decryption failed: Cannot allocate memory"
"pinentry-timeout 30"
"allow-loopback-pinentry"
"enable-ssh-support"
"no-allow-external-cache"
];
};
}

View file

@ -0,0 +1,5 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ pinentry.gtk2 ];
}

View file

@ -0,0 +1,75 @@
{ config, superConfig, pkgs, lib, ... }:
{
home.file = {
".local/share/weechat/sec.conf".text = ''
#
# weechat -- sec.conf
#
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
#
# Use /set or similar command to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart
#
[crypt]
cipher = aes256
hash_algo = sha512
passphrase_command = "${pkgs.pass}/bin/pass secrets/weechat-pass"
salt = on
[data]
__passphrase__ = on
znc = "552E98A5111B986C1003CF86C67DF2AF4B3FDE88E5762FC01EB4A00E31B8363ABFCBBE7A702CB72C298F61D4005D1C5AABB30602BBFCE9E4013CBE88D3D3DB66B18C551743D7816C4F0C9DA44B83DB5807BBB02A48B66D"
matrix = "CC989DF79CDAECC1CE32F10FA9B42B6AE9FA63B41C0B3FCCCD4A309AB798CDEE695E0B4A2E0C975C6364927C76D4FEB25BC84C7AF8989DC418A205A5D62E9330E142E4F11AB59E0720867915DEEFCA70E80102C639D35B"
'';
};
programs.weechat = {
enable = true;
init = lib.mkBefore ''
/server add softnet athame.kittywit.ch/5001 -ssl -autoconnect
/server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect
'';
scripts = with pkgs.weechatScripts; [
weechat-notify-send
];
config = {
irc = {
server = {
softnet = {
address = "athame.kittywit.ch/5001";
password = "kat@${superConfig.networking.hostName}/softnet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
liberachat = {
address = "athame.kittywit.ch/5001";
password = "kat@${superConfig.networking.hostName}/liberachat:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
espernet = {
address = "athame.kittywit.ch/5001";
password = "kat@${superConfig.networking.hostName}/espernet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
};
};
matrix = {
server.kittywitch = {
address = "kittywit.ch";
device_name = "${superConfig.networking.hostName}/weechat";
username = "kat";
password = "\${sec.data.matrix}";
};
};
};
};
}

View file

@ -0,0 +1,9 @@
{ config, ... }:
{
programs.zsh = {
shellAliases = {
abbyradio = "mpv $(pass secrets/abbyradio)";
};
};
}

View file

@ -0,0 +1,106 @@
{ config, lib, superConfig, pkgs, tf, ... }:
{
kw.secrets = [
"matrix-pass"
"znc-pass"
];
secrets.files.weechat-sec = {
text = ''
#
# weechat -- sec.conf
#
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
#
# Use /set or similar command to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart
#
[crypt]
cipher = aes256
hash_algo = sha512
salt = off
[data]
__passphrase__ = off
znc = "${tf.variables.znc-pass.ref}"
matrix = "${tf.variables.matrix-pass.ref}"
'';
owner = "kat";
group = "users";
};
home.file = {
".local/share/weechat/sec.conf".source = config.lib.file.mkOutOfStoreSymlink config.secrets.files.weechat-sec.path;
};
services.weechat.enable = true;
systemd.user.services.weechat-tmux = let scfg = config.services.weechat; in lib.mkForce {
Unit = {
Description = "Weechat tmux session";
After = [ "network.target" ];
};
Service = {
Type = "oneshot";
Environment=[
"TMUX_TMPDIR=%t"
"WEECHAT_HOME=${toString config.programs.weechat.homeDirectory}"
];
RemainAfterExit = true;
X-RestartIfChanged = false;
ExecStart = "${scfg.tmuxPackage}/bin/tmux -2 new-session -d -s ${scfg.sessionName} ${scfg.binary}";
ExecStop = "${scfg.tmuxPackage}/bin/tmux kill-session -t ${scfg.sessionName}";
};
Install.WantedBy = [ "default.target" ];
};
programs.weechat = {
enable = true;
init = lib.mkBefore ''
/server add softnet athame.kittywit.ch/5001 -ssl -autoconnect
/server add liberachat athame.kittywit.ch/5001 -ssl -autoconnect
'';
scripts = with pkgs.weechatScripts; [
weechat-notify-send
];
config = {
irc = {
server = {
softnet = {
address = "athame.kittywit.ch/5001";
password = "kat@${superConfig.networking.hostName}/softnet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
liberachat = {
address = "athame.kittywit.ch/5001";
password = "kat@${superConfig.networking.hostName}/liberachat:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
espernet = {
address = "athame.kittywit.ch/5001";
password = "kat@${superConfig.networking.hostName}/espernet:\${sec.data.znc}";
ssl = true;
ssl_verify = false;
autoconnect = true;
};
};
};
matrix = {
server.kittywitch = {
address = "kittywit.ch";
device_name = "${superConfig.networking.hostName}/weechat";
username = "kat";
password = "\${sec.data.matrix}";
};
};
};
};
}

View file

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
imports = [
./waybar
./mako.nix
./sway.nix
./gammastep.nix
./konawall.nix
./packages.nix
];
}

View file

@ -0,0 +1,9 @@
{ config, lib, ... }:
{
services.gammastep = {
enable = true;
latitude = "51.5074";
longitude = "0.1278";
};
}

View file

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
services.konawall = {
enable = true;
package = pkgs.konawall-sway;
};
}

View file

@ -0,0 +1,31 @@
{ config, pkgs, lib, witch, ... }:
let
base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
config.lib.arc.base16.schemeForAlias.default;
in
{
systemd.user.services = {
mako = {
Unit = {
Description = "mako";
X-Restart-Triggers =
[ (toString config.xdg.configFile."mako/config".source) ];
};
Service = {
ExecStart = "${pkgs.mako}/bin/mako";
Restart = "always";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
};
programs.mako = {
enable = true;
font = "${config.kw.font.name} ${toString config.kw.font.size}";
defaultTimeout = 3000;
borderColor = base16.base08;
backgroundColor = lib.hextorgba base16.base00 0.75;
textColor = base16.base05;
};
}

View file

@ -0,0 +1,5 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ sway-scrot ];
}

View file

@ -0,0 +1,395 @@
{ config, pkgs, lib, witch, ... }:
let
base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
config.lib.arc.base16.schemeForAlias.default;
footwrap = pkgs.writeShellScriptBin "footwrap" ''
exec foot "$2"
'';
in
{
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
WLR_DRM_DEVICES="/dev/dri/card0";
};
home.file = {
".xkb/symbols/us_gbp_map".text = ''
default partial alphanumeric_keys
xkb_symbols "basic" {
include "us(altgr-intl)"
include "level3(caps_switch)"
name[Group1] = "English (US, international with pound sign)";
key <AD03> { [ e, E, EuroSign, cent ] };
key <AE03> { [ 3, numbersign, sterling] };
};
'';
};
xdg.configFile."wofi/wofi.css".text = ''
#scroll, #input {
background: ${base16.base01};
}
window {
font-family: ${config.kw.font.name};
background: ${lib.hextorgba base16.base00 0.75};
border-radius: 1em;
font-size: ${config.kw.font.size_css};
color: ${base16.base07};
}
#outer-box {
margin: 1em;
}
#scroll {
border: 1px solid ${base16.base03};
}
#input {
border: 1px solid ${base16.base0C};
margin: 1em;
background: ${base16.base02};
color: ${base16.base04};
}
#entry {
border-bottom: 1px dashed ${base16.base04};
padding: .75em;
}
#entry:selected {
background-color: ${base16.base0D};
}
'';
kw.wallpapers = [ ./wallpapers/left.jpg ./wallpapers/main.png ./wallpapers/right.jpg ];
home.packages = with pkgs; [ grim slurp wl-clipboard jq quintom-cursor-theme gsettings-desktop-schemas glib wofi ];
services.i3gopher = { enable = true; };
programs.zsh.profileExtra = ''
# If running from tty1 start sway
if [ "$(tty)" = "/dev/tty1" ]; then
systemctl --user unset-environment \
SWAYSOCK \
I3SOCK \
WAYLAND_DISPLAY \
DISPLAY \
IN_NIX_SHELL \
__HM_SESS_VARS_SOURCED \
GPG_TTY \
NIX_PATH \
SHLVL
exec env --unset=SHLVL systemd-cat -t sway -- sway
fi
'';
wayland.windowManager.sway =
let
cfg = config.wayland.windowManager.sway.config;
bindsym = k: v: "bindsym ${k} ${v}";
bindWorkspace = key: workspace: {
"${cfg.modifier}+${key}" = "workspace number ${workspace}";
"${cfg.modifier}+shift+${key}" =
"move container to workspace number ${workspace}";
};
workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
] ++ [ (bindWorkspace "0" "10:10") ]
++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [
"F1"
"F2"
"F3"
"F4"
"F5"
"F6"
"F7"
"F8"
"F9"
"F10"
"F11"
"F12"
];
workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings;
workspaceBindingsStr =
lib.concatStringsSep "\n" (lib.flatten workspaceBindings');
in
{
enable = true;
config =
let
pactl = "${config.home.nixosConfig.hardware.pulseaudio.package or pkgs.pulseaudio}/bin/pactl";
dmenu = "${pkgs.wofi}/bin/wofi -idbt ${footwrap}/bin/footwrap -s ~/.config/wofi/wofi.css -p '' -W 25%";
in
{
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
input = {
"*" = {
xkb_layout = "us_gbp_map";
xkb_options = "compose:rctrl,ctrl:nocaps";
};
};
fonts = {
names = [ config.kw.font.name ];
style = "Medium";
size = config.kw.font.size;
};
terminal = "${pkgs.foot}/bin/foot";
menu =
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${footwrap}/bin/footwrap'";
modifier = "Mod4";
assigns = { "12:F2" = [{ class = "screenstub"; }]; };
startup = [
{
command = "gsettings set org.gnome.desktop.interface cursor-theme 'Quintom_Snow'";
}
{
command = "systemctl --user restart mako";
always = true;
}
{
command = "systemctl --user restart konawall.service";
always = true;
}
];
modes.resize = {
"a" = "resize shrink width 4 px or 4 ppt";
"s" = "resize shrink height 4 px or 4 ppt";
"w" = "resize grow height 4 px or 4 ppt";
"d" = "resize grow width 4 px or 4 ppt";
"Left" = "resize shrink width 4 px or 4 ppt";
"Down" = "resize shrink height 4 px or 4 ppt";
"Up" = "resize grow height 4 px or 4 ppt";
"Right" = "resize grow width 4 px or 4 ppt";
Return = ''mode "default"'';
Escape = ''mode "default"'';
"${cfg.modifier}+z" = ''mode "default"'';
};
window = {
border = 1;
titlebar = false;
};
floating = {
border = 1;
titlebar = false;
};
keybindings = {
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
# focus windows - regular
"${cfg.modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right";
# focus windows - wsad
"${cfg.modifier}+a" = "focus left";
"${cfg.modifier}+s" = "focus down";
"${cfg.modifier}+w" = "focus up";
"${cfg.modifier}+d" = "focus right";
# move window / container - regular
"${cfg.modifier}+Shift+Left" = "move left";
"${cfg.modifier}+Shift+Down" = "move down";
"${cfg.modifier}+Shift+Up" = "move up";
"${cfg.modifier}+Shift+Right" = "move right";
# move window / container - wsad
"${cfg.modifier}+Shift+a" = "move left";
"${cfg.modifier}+Shift+s" = "move down";
"${cfg.modifier}+Shift+w" = "move up";
"${cfg.modifier}+Shift+d" = "move right";
# focus output - regular
"${cfg.modifier}+control+Left" = "focus output left";
"${cfg.modifier}+control+Down" = "focus output down";
"${cfg.modifier}+control+Up" = "focus output up";
"${cfg.modifier}+control+Right" = "focus output right";
# focus output - wsad
"${cfg.modifier}+control+a" = "focus output left";
"${cfg.modifier}+control+s" = "focus output down";
"${cfg.modifier}+control+w" = "focus output up";
"${cfg.modifier}+control+d" = "foVcus output right";
# move container to output - regular
"${cfg.modifier}+control+Shift+Left" = "move container to output left";
"${cfg.modifier}+control+Shift+Down" = "move container to output down";
"${cfg.modifier}+control+Shift+Up" = "move container to output up";
"${cfg.modifier}+control+Shift+Right" = "move container to output right";
# move container to output - wsad
"${cfg.modifier}+control+Shift+a" = "move container to output left";
"${cfg.modifier}+control+Shift+s" = "move container to output down";
"${cfg.modifier}+control+Shift+w" = "move container to output up";
"${cfg.modifier}+control+Shift+d" = "move container to output right";
# move workspace to output - regular
"${cfg.modifier}+control+Shift+Mod1+Left" = "move workspace to output left";
"${cfg.modifier}+control+Shift+Mod1+Down" = "move workspace to output down";
"${cfg.modifier}+control+Shift+Mod1+Up" = "move workspace to output up";
"${cfg.modifier}+control+Shift+Mod1+Right" = "move workspace to output right";
# move workspace to output - wsad
"${cfg.modifier}+control+Shift+Mod1+a" = "move workspace to output left";
"${cfg.modifier}+control+Shift+Mod1+s" = "move workspace to output down";
"${cfg.modifier}+control+Shift+Mod1+w" = "move workspace to output up";
"${cfg.modifier}+control+Shift+Mod1+d" = "move workspace to output right";
# focus parent/child
"${cfg.modifier}+q" = "focus parent";
"${cfg.modifier}+e" = "focus child";
# floating
"${cfg.modifier}+Shift+space" = "floating toggle";
"${cfg.modifier}+space" = "focus mode_toggle";
# workspace history switching
"${cfg.modifier}+Tab" = "workspace back_and_forth";
"${cfg.modifier}+Shift+Tab" = "exec ${config.services.i3gopher.focus-last}";
# multimedia / laptop
"XF86AudioLowerVolume" = "exec --no-startup-id ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioMute" = "exec --no-startup-id ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMute+Shift" = "exec --no-startup-id ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
# dmenu
"${cfg.modifier}+r" = "exec ${cfg.menu}";
# screenshots - upload
"${cfg.modifier}+Print" =
"exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload screen";
"${cfg.modifier}+Shift+Print" =
"exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload area";
"${cfg.modifier}+Mod1+Print" =
"exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload window";
"${cfg.modifier}+Control+Print" =
"exec ${pkgs.sway-scrot}/bin/sway-scrot --notify upload output";
# screenshots - clipboard
"Print" = "exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys screen";
"Shift+Print" =
"exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys area";
"Mod1+Print" =
"exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys window";
"Control+Print" =
"exec ${pkgs.sway-scrot}/bin/sway-scrot --notify copys output";
# layout handling
"${cfg.modifier}+b" = "splith";
"${cfg.modifier}+v" = "splitv";
"${cfg.modifier}+o" = "layout stacking";
"${cfg.modifier}+i" = "layout tabbed";
"${cfg.modifier}+h" = "layout toggle split";
"${cfg.modifier}+f" = "fullscreen";
# sway specific
"${cfg.modifier}+Shift+q" = "kill";
"${cfg.modifier}+Shift+c" = "reload";
# mode triggers
"${cfg.modifier}+Shift+r" = "mode resize";
"${cfg.modifier}+Delete" = ''
mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
};
colors = {
focused = {
border = base16.base01;
background = base16.base0D;
text = base16.base07;
indicator = base16.base0D;
childBorder = base16.base0D;
};
focusedInactive = {
border = base16.base02;
background = base16.base04;
text = base16.base00;
indicator = base16.base04;
childBorder = base16.base04;
};
unfocused = {
border = base16.base01;
background = base16.base02;
text = base16.base06;
indicator = base16.base02;
childBorder = base16.base02;
};
urgent = {
border = base16.base03;
background = base16.base08;
text = base16.base00;
indicator = base16.base08;
childBorder = base16.base08;
};
};
};
wrapperFeatures.gtk = true;
extraConfig = ''
hide_edge_borders smart_no_gaps
smart_borders no_gaps
title_align center
seat seat0 xcursor_theme Quintom_Snow 20
workspace_auto_back_and_forth yes
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym ${cfg.modifier}+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym equal gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym equal gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
${workspaceBindingsStr}
'';
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

@ -0,0 +1,156 @@
{ config, lib, pkgs, ... }:
let
base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
config.lib.arc.base16.schemeForAlias.default;
in
{
programs.waybar = {
enable = true;
style = import ./waybar.css.nix {
inherit base16;
inherit (lib) hextorgba;
font = config.kw.font;
};
settings = [{
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
modules-center = ["clock" "clock#arc" "clock#miku" "clock#hex" ]; # "clock" "custom/weather"
modules-right = [
"pulseaudio"
"cpu"
"memory"
"temperature"
"backlight"
"battery"
#"mpd"
"network"
#"custom/weather"
"idle_inhibitor"
"custom/konawall"
"custom/gpg-status"
"tray"
];
modules = {
"sway/workspaces" = { format = "{name}"; };
"sway/window" = {
format = " {}";
max-length = 50;
};
#"custom/weather" = {
# format = "{}";
# interval = 3600;
# on-click = "xdg-open 'https://google.com/search?q=weather'";
# exec =
# "${pkgs.kat-weather}/bin/kat-weather ${witch.secrets.profiles.sway.city} ${witch.secrets.profiles.sway.api_key}";
#};
tray = {
icon-size = 12;
spacing = 2;
};
"custom/gpg-status" = {
format = "{}";
interval = 300;
return-type = "json";
exec = "${pkgs.waybar-gpg}/bin/kat-gpg-status";
};
"custom/konawall" = {
format = "{}";
interval = "once";
return-type = "json";
exec = "${pkgs.waybar-konawall}/bin/konawall-status";
exec-on-event = true;
on-click = "${pkgs.waybar-konawall}/bin/konawall-toggle";
on-click-right = "systemctl --user restart konawall";
};
cpu = { format = " {usage}%"; };
#mpd = {
# format = " {albumArtist} - {title}";
# format-stopped = "ﱙ";
# format-paused = " Paused";
# title-len = 16;
#};
memory = { format = " {percentage}%"; };
temperature = {
format = " {temperatureC}°C";
hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input";
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
backlight = {
format = "{icon} {percent}%";
format-icons = [ "" "" ];
on-scroll-up = "${pkgs.light}/bin/light -A 1";
on-scroll-down = "${pkgs.light}/bin/light -U 1";
};
battery = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-charging = " {capacity}%";
format-plugged = " {capacity}%";
format-alt = "{icon} {time}";
format-icons = [ "" "" "" "" "" ];
};
pulseaudio = {
format = "{icon} {volume}%";
format-muted = "";
on-click = "foot pulsemixer";
format-icons = {
default = [
""
""
""
];
};
};
network = {
format-wifi = "";
format-ethernet = "";
format-linked = " {ifname} (NO IP)";
format-disconnected = " DC";
format-alt = "{ifname}: {ipaddr}/{cidr}";
tooltip-format-wifi = "{essid} ({signalStrength}%)";
};
clock = {
format = "{:%a, %F %T}";
tooltip = true;
tooltip-format = "{:%A, %F %T %z (%Z)}";
timezones = [
"Europe/London"
"America/Vancouver"
"Europe/Berlin"
"Pacific/Auckland"
];
interval = 1;
};
"clock#arc" = {
format = "-{:%H}";
tooltip = true;
timezone = "America/Vancouver";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
"clock#miku" = {
format = "+{:%H}";
tooltip = true;
timezone = "Pacific/Auckland";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
"clock#hex" = {
format = "+{:%H}";
tooltip = true;
timezone = "Europe/Berlin";
tooltip-format = "{:%A, %F %R %z (%Z)}";
};
};
}];
};
}

View file

@ -0,0 +1,119 @@
{ hextorgba, base16, font }:
let
bcolor = color: ''
color: ${color};
border-color: ${color};
'';
in ''
* {
border: none;
border-radius: 0;
background: none;
font-family: "${font.name}";
font-size: ${font.size_css};
min-height: 12px;
text-shadow: none;
box-shadow: none;
}
#mode {
color: ${base16.base06};
padding-left: 4px;
padding-right: 4px;
}
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather, #custom-konawall, #custom-gpg-status, #idle_inhibitor {
margin-left: 8px;
margin-right: 8px;
padding-left: 8px;
padding-right: 8px;
transition: none;
border-bottom: 2px solid transparent;
color: ${base16.base07};
}
.modules-left, .modules-center, .modules-right {
margin: 2px 8px;
background: ${hextorgba base16.base00 0.85};
border-radius: 6px;
}
.modules-left {
padding: 0 8px;
}
.modules-center, .modules-right {
padding: 0 4px;
}
tooltip {
padding: 2px;
background: ${hextorgba base16.base00 0.85};
border-radius: 6px;
}
tooltip label {
color: ${base16.base07};
}
#tray {
margin: 0 8px;
}
#window {
color: ${base16.base06};
}
#workspaces button:first-child {
margin-left: 0;
}
#window {
margin-left: 8px;
}
window#waybar.empty {
margin-left: 0px;
}
#workspaces button {
color: ${base16.base06};
font-size: 16px;
border-bottom: 2px solid ${base16.base06};
margin: 0 2px;
}
#workspaces button.focused {
color: ${base16.base0D};
border-bottom: 2px solid ${base16.base0D};
}
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
background: ${base16.base07};
color: ${base16.base0D};
}
#clock.arc { ${bcolor base16.base0B} }
#clock.miku { ${bcolor base16.base0C} }
#clock.hex { ${bcolor base16.base0F} }
#custom-konawall.enabled { ${bcolor base16.base0E} }
#custom-konawall.disabled { ${bcolor base16.base0D} }
#idle_inhibitor.activated { ${bcolor base16.base0E} }
#idle_inhibitor.deactivated { ${bcolor base16.base0D} }
#custom-gpg-status.enabled { ${bcolor base16.base0B} }
#custom-gpg-status.disabled { ${bcolor base16.base08} }
#network { ${bcolor base16.base0C} }
#custom-weather { ${bcolor base16.base00} }
#pulseaudio { ${bcolor base16.base06} }
#temperature { ${bcolor base16.base0B} }
#pulseaudio.muted { ${bcolor base16.base03} }
#battery { ${bcolor base16.base0C} }
#backlight { ${bcolor base16.base0D} }
#cpu { ${bcolor base16.base08} }
#memory { ${bcolor base16.base09} }
#clock { ${bcolor base16.base07} }
''