mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
Moving to modules. Structural changes.
This commit is contained in:
parent
3903bc1766
commit
060d4c6d1e
258 changed files with 621 additions and 407 deletions
|
|
@ -1,20 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = {
|
||||
imports = [ ./base ];
|
||||
home.stateVersion = "20.09";
|
||||
};
|
||||
|
||||
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" ];
|
||||
hashedPassword =
|
||||
"$6$i28yOXoo$/WokLdKds5ZHtJHcuyGrH2WaDQQk/2Pj0xRGLgS8UcmY2oMv3fw2j/85PRpsJJwCB2GBRYRK5LlvdTleHd3mB.";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
base16 = {
|
||||
shell.enable = true;
|
||||
schemes = [ "rebecca.rebecca" ];
|
||||
};
|
||||
# home.base16-shell = {
|
||||
# enable = true;
|
||||
# defaultTheme = "rebecca.rebecca";
|
||||
# };
|
||||
}
|
||||
|
|
@ -1,19 +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
|
||||
./secrets.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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";
|
||||
}
|
||||
|
|
@ -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 |
|
|
@ -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
|
||||
];
|
||||
}
|
||||
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
secrets = {
|
||||
persistentRoot = config.xdg.cacheHome + "/kat/secrets";
|
||||
external = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.zsh.shellAliases = {
|
||||
tt = "tmux new -AD -s";
|
||||
};
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
# start from 1
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# proper title handling
|
||||
set -g set-titles on
|
||||
set -g set-titles-string "#T"
|
||||
|
||||
# 256 color
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
# modes
|
||||
setw -g clock-mode-colour colour5
|
||||
setw -g mode-style 'fg=colour1 bg=colour18 bold'
|
||||
|
||||
# panes
|
||||
set -g pane-border-style 'fg=colour19 bg=colour0'
|
||||
set -g pane-active-border-style 'bg=colour0 fg=colour9'
|
||||
|
||||
# statusbar
|
||||
set -g status-position bottom
|
||||
set -g status-justify left
|
||||
set -g status-style 'bg=colour18 fg=colour137 dim'
|
||||
set -g status-left '''
|
||||
set -g status-right '#[fg=colour233,bg=colour19] %F #[fg=colour233,bg=colour8] %H:%M:%S %Z'
|
||||
set -g status-right-length 50
|
||||
set -g status-left-length 20
|
||||
|
||||
setw -g window-status-current-style 'fg=colour1 bg=colour19 bold'
|
||||
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
|
||||
|
||||
setw -g window-status-style 'fg=colour9 bg=colour18'
|
||||
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -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..?
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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.deploy.profile.sway 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
|
||||
"")
|
||||
|
|
@ -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 = 0;
|
||||
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:,${base01}}\${format_buffer}";
|
||||
hotlist = " \${color:${base0B}}(\${hotlist}\${color:${base0B}})";
|
||||
hotlist_highlight = "\${color:${base0F}}";
|
||||
hotlist_low = "\${color:${base06}}";
|
||||
hotlist_message = "\${color:${base0E}}";
|
||||
hotlist_none = "\${color:${base05}}";
|
||||
hotlist_private = "\${color:${base0A}}";
|
||||
hotlist_separator = "\${color:${base04}},";
|
||||
number = "\${color:${base0A}}\${number}\${if:\${number_displayed}?.: }";
|
||||
};
|
||||
};
|
||||
weechat = {
|
||||
look = {
|
||||
mouse = true;
|
||||
separator_horizontal = "";
|
||||
read_marker_string = "─";
|
||||
prefix_same_nick = "↳";
|
||||
};
|
||||
color = {
|
||||
chat_nick_self = base0F;
|
||||
separator = base0A;
|
||||
chat_read_marker = base0D;
|
||||
chat_read_marker_bg = base03;
|
||||
};
|
||||
bar = {
|
||||
buflist = {
|
||||
size_max = 24;
|
||||
color_delim = base0A;
|
||||
};
|
||||
input = {
|
||||
items = "[input_prompt]+(away),[input_search],[input_paste],input_text,[vi_buffer]";
|
||||
color_delim = base0A;
|
||||
conditions = "\${window.buffer.full_name} != perl.highmon";
|
||||
};
|
||||
nicklist = {
|
||||
size_max = 18;
|
||||
color_delim = base0A;
|
||||
};
|
||||
status = {
|
||||
color_bg = base01;
|
||||
color_fg = base05;
|
||||
color_delim = base0A;
|
||||
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 = base01;
|
||||
color_fg = base05;
|
||||
color_delim = base0A;
|
||||
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 = base0A;
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,87 +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 ];
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
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";
|
||||
};
|
||||
}
|
||||
];
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "sudo" "adb" "cargo" "emoji" ];
|
||||
};
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
rec {
|
||||
base = ./base.nix;
|
||||
gui = ./gui.nix;
|
||||
sway = ./sway.nix;
|
||||
dev = ./dev.nix;
|
||||
media = ./media.nix;
|
||||
personal = ./personal.nix;
|
||||
|
||||
server = { imports = [ personal ]; };
|
||||
guiFull = { imports = [ gui sway dev media personal ]; };
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ./dev ]; };
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ cookiecutter ];
|
||||
|
||||
home.shell.functions.katenv = ''
|
||||
cookiecutter cookiecutters --directory $1
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./packages.nix ./cookiecutter.nix ];
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ hyperfine hexyl tokei horizon-eda ];
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ./gui ]; };
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
deploy.profile.gui = true;
|
||||
|
||||
imports = [ ./firefox ./kitty.nix ./packages.nix ./gtk.nix ./wezterm.nix ./foot.nix ./xdg.nix ./ranger.nix ];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.zsh.shellAliases = {
|
||||
ff-pm = "firefox --ProfileManager";
|
||||
ff-main = "firefox -P main";
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_CURRENT_DESKTOP = "sway";
|
||||
};
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-wayland;
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
sponsorblock
|
||||
auto-tab-discard
|
||||
bitwarden
|
||||
darkreader
|
||||
decentraleyes
|
||||
foxyproxy-standard
|
||||
clearurls
|
||||
bypass-paywalls
|
||||
df-youtube
|
||||
https-everywhere
|
||||
old-reddit-redirect
|
||||
privacy-badger
|
||||
reddit-enhancement-suite
|
||||
refined-github
|
||||
stylus
|
||||
terms-of-service-didnt-read
|
||||
#tree-style-tab
|
||||
sidebery
|
||||
multi-account-containers
|
||||
ublock-origin
|
||||
violentmonkey
|
||||
];
|
||||
profiles = {
|
||||
main = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
settings = commonSettings // { };
|
||||
userChrome = import ./userChrome.css.nix { profile = "main"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ profile }:
|
||||
|
||||
''
|
||||
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
|
||||
#sidebar-header {
|
||||
display: none;
|
||||
}
|
||||
''
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
{ 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 = "Iosevka Term:size=9, Twitter Color Emoji:size=8";
|
||||
font-bold = "Iosevka Term:size=9:style=Bold";
|
||||
font-italic = "Iosevka Term:size=9:style=Italic";
|
||||
font-bold-italic = "Iosevka Term:size=9:style=Bold Italic";
|
||||
dpi-aware = "no";
|
||||
};
|
||||
colors = {
|
||||
alpha = "0.9";
|
||||
};
|
||||
key-bindings = {
|
||||
show-urls-copy = "Control+Shift+i";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Numix-Square";
|
||||
package = pkgs.numix-icon-theme-square;
|
||||
};
|
||||
theme = {
|
||||
name = "Adementary-dark";
|
||||
package = pkgs.adementary-theme;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
{ config, lib, pkgs, witch, ... }:
|
||||
|
||||
let
|
||||
witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
|
||||
config.lib.arc.base16.schemeForAlias.default;
|
||||
witch.style.font = {
|
||||
name = "Iosevka Nerd Font";
|
||||
size = "10";
|
||||
size_css = "14px";
|
||||
};
|
||||
in
|
||||
{
|
||||
wayland.windowManager.sway.extraSessionCommands = ''
|
||||
export KITTY_CACHE_DIRECTORY="/tmp/kitty";
|
||||
'';
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font.name = witch.style.font.name;
|
||||
settings = {
|
||||
font_size = witch.style.font.size;
|
||||
# background = witch.style.base16.color0;
|
||||
background_opacity = "0.9";
|
||||
# foreground = witch.style.base16.color7;
|
||||
# selection_background = witch.style.base16.color7;
|
||||
# selection_foreground = witch.style.base16.color0;
|
||||
# url_color = witch.style.base16.color3;
|
||||
# cursor = witch.style.base16.color7;
|
||||
# active_border_color = "#75715e";
|
||||
# active_tab_background = "#9900ff";
|
||||
# active_tab_foreground = witch.style.base16.color7;
|
||||
# inactive_tab_background = "#3a3a3a";
|
||||
# inactive_tab_foreground = "#665577";
|
||||
}; # // witch.style.base16;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
_1password
|
||||
bitwarden
|
||||
wire-desktop
|
||||
element-desktop
|
||||
exiftool
|
||||
thunderbird
|
||||
mumble-develop
|
||||
dino
|
||||
transmission-remote-gtk
|
||||
scrcpy
|
||||
lm_sensors
|
||||
google-chrome
|
||||
p7zip
|
||||
zip
|
||||
unzip
|
||||
nyxt
|
||||
baresip
|
||||
discord
|
||||
tdesktop
|
||||
yubikey-manager
|
||||
vegur
|
||||
gparted
|
||||
cryptsetup
|
||||
];
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ranger
|
||||
];
|
||||
|
||||
xdg.configFile."ranger/rc.conf".text = ''
|
||||
set preview_images true
|
||||
set preview_images_method iterm2
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
{ 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 {
|
||||
home.packages = [
|
||||
pkgs.wezterm
|
||||
];
|
||||
|
||||
xdg.configFile."wezterm/wezterm.lua".text = ''
|
||||
local wezterm = require 'wezterm';
|
||||
|
||||
return {
|
||||
term = "wezterm",
|
||||
font = wezterm.font_with_fallback({"Iosevka Term","Twitter Color Emoji"}),
|
||||
font_size = 9.0,
|
||||
window_background_opacity = 0.9,
|
||||
colors = {
|
||||
ansi = {${colors.ansi}},
|
||||
brights = {${colors.brights}},
|
||||
background = "${witch.style.base16.base00}",
|
||||
foreground = "${witch.style.base16.base05}",
|
||||
tab_bar = {
|
||||
background = "${witch.style.base16.base00}",
|
||||
active_tab = {
|
||||
bg_color = "${witch.style.base16.base0A}",
|
||||
fg_color = "${witch.style.base16.base05}",
|
||||
},
|
||||
inactive_tab = {
|
||||
bg_color = "${witch.style.base16.base01}",
|
||||
fg_color = "${witch.style.base16.base03}",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
xdg-utils
|
||||
];
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ./media ]; };
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{ 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./mpv.nix
|
||||
./obs.nix
|
||||
./syncplay.nix
|
||||
./beets.nix
|
||||
./mpd.nix
|
||||
./ncmpcpp.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
{ 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"
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
{ 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";
|
||||
vo = "gpu";
|
||||
volume-max = 200;
|
||||
keep-open = true;
|
||||
opengl-waitvsync = true;
|
||||
hwdec = "auto";
|
||||
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";
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
mpdMusicDir = "/home/kat/media-share/music";
|
||||
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";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
|
||||
};
|
||||
|
||||
programs.zsh.shellAliases = { obs = "env QT_QPA_PLATFORM=xcb obs"; };
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
audacity
|
||||
avidemux
|
||||
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
|
||||
vlc
|
||||
imv
|
||||
ffmpeg-full
|
||||
youtube-dl
|
||||
mkchromecast
|
||||
v4l-utils
|
||||
gimp-with-plugins
|
||||
wf-recorder
|
||||
];
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
|
||||
programs.syncplay = {
|
||||
enable = true;
|
||||
username = "kat";
|
||||
defaultRoom = "lounge";
|
||||
server = { host = "sync.kittywit.ch"; };
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ./personal ]; };
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./gpg.nix ./packages.nix ];
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{ 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"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ pinentry.gtk2 ];
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.kat = { imports = [ ./sway ]; };
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
deploy.profile.sway = true;
|
||||
|
||||
imports = [
|
||||
./waybar
|
||||
./mako.nix
|
||||
./sway.nix
|
||||
./gammastep.nix
|
||||
./konawall.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
latitude = "51.5074";
|
||||
longitude = "0.1278";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.konawall = { enable = true; };
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
{ config, pkgs, lib, witch, ... }:
|
||||
|
||||
let
|
||||
base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
|
||||
config.lib.arc.base16.schemeForAlias.default;
|
||||
font = {
|
||||
name = "Iosevka Nerd Font";
|
||||
size = "10";
|
||||
size_css = "14px";
|
||||
};
|
||||
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;
|
||||
defaultTimeout = 3000;
|
||||
borderColor = base16.base0A;
|
||||
backgroundColor = "${base16.base00}70";
|
||||
textColor = base16.base05;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ kat-scrot ];
|
||||
}
|
||||
|
|
@ -1,277 +0,0 @@
|
|||
{ config, pkgs, lib, witch, ... }:
|
||||
|
||||
let
|
||||
base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
|
||||
config.lib.arc.base16.schemeForAlias.default;
|
||||
font = {
|
||||
name = "Iosevka Term";
|
||||
size = 9.0;
|
||||
size_css = "14px";
|
||||
};
|
||||
in
|
||||
{
|
||||
home.sessionVariables = {
|
||||
XDG_CURRENT_DESKTOP = "sway";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ grim slurp wl-clipboard jq ];
|
||||
|
||||
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
|
||||
dmenu =
|
||||
"${pkgs.bemenu}/bin/bemenu --fn '${font.name} ${toString font.size}' --nb '${base16.base00}' --nf '${base16.base07}' --sb '${base16.base01}' --sf '${base16.base07}' -l 5 -m -1 -i";
|
||||
in
|
||||
{
|
||||
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
|
||||
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "gb";
|
||||
# xkb_variant = "nodeadkeys";
|
||||
# xkb_options = "ctrl:nocaps";
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
names = [ font.name ];
|
||||
style = "Medium";
|
||||
size = font.size;
|
||||
};
|
||||
terminal = "${pkgs.foot}/bin/foot";
|
||||
# TODO: replace with wofi
|
||||
menu =
|
||||
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'";
|
||||
modifier = "Mod4";
|
||||
|
||||
assigns = { "12:F2" = [{ class = "screenstub"; }]; };
|
||||
startup = [
|
||||
{
|
||||
command = "systemctl --user restart mako";
|
||||
always = true;
|
||||
}
|
||||
{ command = "mkchromecast -t"; }
|
||||
{
|
||||
command = "systemctl --user restart konawall.service";
|
||||
always = true;
|
||||
}
|
||||
];
|
||||
|
||||
window = {
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
};
|
||||
|
||||
floating = {
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
|
||||
|
||||
"${cfg.modifier}+Left" = "focus left";
|
||||
"${cfg.modifier}+Down" = "focus down";
|
||||
"${cfg.modifier}+Up" = "focus up";
|
||||
"${cfg.modifier}+Right" = "focus right";
|
||||
|
||||
"${cfg.modifier}+Shift+Left" = "move left";
|
||||
"${cfg.modifier}+Shift+Down" = "move down";
|
||||
"${cfg.modifier}+Shift+Up" = "move up";
|
||||
"${cfg.modifier}+Shift+Right" = "move right";
|
||||
|
||||
"${cfg.modifier}+Shift+space" = "floating toggle";
|
||||
"${cfg.modifier}+space" = "focus mode_toggle";
|
||||
|
||||
"${cfg.modifier}+Tab" = "workspace back_and_forth";
|
||||
"${cfg.modifier}+Shift+Tab" =
|
||||
"exec ${config.services.i3gopher.focus-last}";
|
||||
"${cfg.modifier}+Ctrl+Left" = "workspace prev_on_output";
|
||||
"${cfg.modifier}+Ctrl+Right" = "workspace next_on_output";
|
||||
|
||||
"XF86AudioRaiseVolume" =
|
||||
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%";
|
||||
"XF86AudioLowerVolume" =
|
||||
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%";
|
||||
"XF86AudioMute" =
|
||||
"exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle";
|
||||
"XF86AudioMicMute" =
|
||||
"exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
|
||||
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
|
||||
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
|
||||
|
||||
"${cfg.modifier}+d" = "exec ${cfg.menu}";
|
||||
|
||||
"${cfg.modifier}+Print" =
|
||||
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload screen";
|
||||
"${cfg.modifier}+Shift+Print" =
|
||||
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload area";
|
||||
"${cfg.modifier}+Mod1+Print" =
|
||||
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload window";
|
||||
"${cfg.modifier}+Control+Print" =
|
||||
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload output";
|
||||
|
||||
"Print" = "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys screen";
|
||||
"Shift+Print" =
|
||||
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys area";
|
||||
"Mod1+Print" =
|
||||
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys window";
|
||||
"Control+Print" =
|
||||
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys output";
|
||||
|
||||
"${cfg.modifier}+i" = "move workspace to output left";
|
||||
"${cfg.modifier}+o" = "move workspace to output right";
|
||||
"${cfg.modifier}+b" = "splith";
|
||||
"${cfg.modifier}+v" = "splitv";
|
||||
"${cfg.modifier}+s" = "layout stacking";
|
||||
"${cfg.modifier}+w" = "layout tabbed";
|
||||
"${cfg.modifier}+e" = "layout toggle split";
|
||||
"${cfg.modifier}+f" = "fullscreen";
|
||||
|
||||
"${cfg.modifier}+Shift+q" = "kill";
|
||||
"${cfg.modifier}+Shift+c" = "reload";
|
||||
|
||||
"${cfg.modifier}+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.base08;
|
||||
background = base16.base0A;
|
||||
text = base16.base00;
|
||||
indicator = base16.base0F;
|
||||
childBorder = base16.base0A;
|
||||
};
|
||||
focusedInactive = {
|
||||
border = base16.base00;
|
||||
background = base16.base07;
|
||||
text = base16.base0A;
|
||||
indicator = base16.base07;
|
||||
childBorder = base16.base07;
|
||||
};
|
||||
unfocused = {
|
||||
border = base16.base00;
|
||||
background = base16.base01;
|
||||
text = base16.base04;
|
||||
indicator = base16.base08;
|
||||
childBorder = base16.base01;
|
||||
};
|
||||
urgent = {
|
||||
border = base16.base00;
|
||||
background = base16.base09;
|
||||
text = base16.base00;
|
||||
indicator = base16.base09;
|
||||
childBorder = base16.base09;
|
||||
};
|
||||
};
|
||||
};
|
||||
wrapperFeatures.gtk = true;
|
||||
extraConfig = ''
|
||||
hide_edge_borders smart_no_gaps
|
||||
smart_borders no_gaps
|
||||
title_align center
|
||||
seat seat0 xcursor_theme breeze_cursors 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.
|
Before Width: | Height: | Size: 451 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB |
|
|
@ -1,119 +0,0 @@
|
|||
{ config, lib, pkgs, witch, ... }:
|
||||
|
||||
let
|
||||
base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
|
||||
config.lib.arc.base16.schemeForAlias.default;
|
||||
font = {
|
||||
name = "Iosevka Nerd Font";
|
||||
size = "10";
|
||||
size_css = "12px";
|
||||
};
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.sway {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = import ./waybar.css.nix {
|
||||
inherit font base16;
|
||||
inherit (pkgs) hextorgba;
|
||||
};
|
||||
settings = [{
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||
modules-center = ["clock" ]; # "clock" "custom/weather"
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
"backlight"
|
||||
"battery"
|
||||
#"mpd"
|
||||
"network"
|
||||
#"custom/weather"
|
||||
"idle_inhibitor"
|
||||
"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}";
|
||||
#};
|
||||
"custom/gpg-status" = {
|
||||
format = "{}";
|
||||
interval = 300;
|
||||
exec = "${pkgs.kat-gpg-status}/bin/kat-gpg-status";
|
||||
};
|
||||
cpu = { format = "CPU {usage}%"; };
|
||||
#mpd = {
|
||||
# format = " {albumArtist} - {title}";
|
||||
# format-stopped = "ﱙ";
|
||||
# format-paused = " Paused";
|
||||
# title-len = 16;
|
||||
#};
|
||||
memory = { format = "MEM {percentage}%"; };
|
||||
temperature = { format = "TMP {temperatureC}°C"; };
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "CAF";
|
||||
deactivated = "SLP";
|
||||
};
|
||||
};
|
||||
backlight = {
|
||||
format = "BL {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 = "BAT {capacity}%";
|
||||
format-charging = "CHRG {capacity}%";
|
||||
format-plugged = "PI {capacity}%";
|
||||
format-alt = "BAT {time}";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "VOL {volume}%";
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
network = {
|
||||
format-wifi = "WIFI";
|
||||
format-ethernet = "NET {ifname}";
|
||||
format-linked = "NET {ifname} (NO IP)";
|
||||
format-disconnected = "NET DC";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%)";
|
||||
};
|
||||
clock = {
|
||||
format = "{:%a, %F %T %Z}";
|
||||
tooltip = true;
|
||||
tooltip-format = "{:%A, %F %T %z (%Z)}";
|
||||
timezones = [
|
||||
"Europe/London"
|
||||
"America/Vancouver"
|
||||
"America/Chicago"
|
||||
"Europe/Berlin"
|
||||
"Pacific/Auckland"
|
||||
];
|
||||
interval = 1;
|
||||
};
|
||||
};
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
{ hextorgba, base16, font }:
|
||||
|
||||
''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "${font.name}";
|
||||
font-size: ${font.size_css};
|
||||
min-height: 14px
|
||||
}
|
||||
|
||||
#mode {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#clock, #memory, #cpu, #temperature, #pulseaudio, #network, #mpd, #backlight, #battery, #custom-weather, #custom-gpg-status, #idle_inhibitor {
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
transition: none;
|
||||
background: ${base16.base02};
|
||||
border-left: 1px solid ${base16.base06};
|
||||
border-right: 1px solid ${base16.base06};
|
||||
color: ${base16.base05}
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: ${hextorgba base16.base00 0.9};
|
||||
border-bottom: 1px solid ${base16.base06};
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: ${base16.base06};
|
||||
padding-left: 16px;
|
||||
padding-right: 16px
|
||||
}
|
||||
|
||||
#workspaces { padding: 0px 4px 0px 4px }
|
||||
|
||||
#workspaces button {
|
||||
color: ${base16.base04};
|
||||
background: ${base16.base02};
|
||||
font-size: 16px;
|
||||
margin: 0px 4px 0px 4px;
|
||||
border-left: 1px solid ${base16.base06};
|
||||
border-right: 1px solid ${base16.base06}
|
||||
}
|
||||
|
||||
#workspaces button:last-child { margin-right: 0px }
|
||||
|
||||
#workspaces button.focused {
|
||||
color: ${base16.base0A};
|
||||
border-color: ${base16.base0A}
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
color: ${base16.base08};
|
||||
border-color: ${base16.base08}
|
||||
}
|
||||
|
||||
#mpd, #idle_inhibitor { color: #5af78e }
|
||||
#mpd.disconnected, #mpd.stopped { color: #282a36 }
|
||||
#network { color: ${base16.base06} }
|
||||
#custom-weather { color: ${base16.base00} }
|
||||
#custom-gpg-status { color: ${base16.base09} }
|
||||
#pulseaudio { color: ${base16.base0A} }
|
||||
#temperature { color: ${base16.base0B} }
|
||||
#battery { color: ${base16.base0C} }
|
||||
#backlight { color: ${base16.base0D} }
|
||||
#cpu { color: ${base16.base0E} }
|
||||
#memory { color: ${base16.base0F} }
|
||||
#clock { color: ${base16.base05} }
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue