diff --git a/hosts/mabon/nixos/default.nix b/hosts/mabon/nixos/default.nix index cabfe4f4..3080f40d 100644 --- a/hosts/mabon/nixos/default.nix +++ b/hosts/mabon/nixos/default.nix @@ -4,13 +4,15 @@ imports = [ ./hw.nix profiles.gui - profiles.sway + profiles.fvwm profiles.laptop - users.kat.guiFull + users.kairi.guiFull ]; deploy.target = "mbp"; + networking.wireless.interfaces = [ "wlp3s0" ]; + boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/nixos.nix b/nixos.nix index 0ceebc52..5a450e36 100644 --- a/nixos.nix +++ b/nixos.nix @@ -13,6 +13,7 @@ options = { deploy.profile.gui = lib.mkEnableOption "graphical system"; + deploy.profile.fvwm = lib.mkEnableOption "fvwm"; deploy.profile.sway = lib.mkEnableOption "sway wm"; deploy.profile.laptop = lib.mkEnableOption "lappytop"; }; @@ -48,6 +49,19 @@ deploy.profile.laptop = lib.mkEnableOption "lappytop"; }; }; + kairi = { + imports = lib.optional (builtins.pathExists (./hosts + "/${hostName}/home")) (import (./hosts + "/${hostName}/home")) + # trusted hosts check + ++ lib.optional (builtins.pathExists (./trusted/hosts + "/${hostName}/home")) (import (./trusted/hosts + "/${hostName}/home")) + # trusted user kairi check + ++ lib.optional (builtins.pathExists ./trusted/users/kairi) (import ./trusted/users/kairi); + + options = { + deploy.profile.gui = lib.mkEnableOption "graphical system"; + deploy.profile.fvwm = lib.mkEnableOption "fvwm"; + deploy.profile.laptop = lib.mkEnableOption "lappytop"; + }; + }; }; }; }; diff --git a/profiles/common/default.nix b/profiles/common/default.nix index 5f3969c5..b3f86283 100644 --- a/profiles/common/default.nix +++ b/profiles/common/default.nix @@ -3,6 +3,7 @@ { imports = [ users.kat.base + users.kairi.base users.arc users.hexchen ./system.nix diff --git a/profiles/fvwm/default.nix b/profiles/fvwm/default.nix new file mode 100644 index 00000000..8aab23c0 --- /dev/null +++ b/profiles/fvwm/default.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + imports = [ ./fvwm.nix ]; + + deploy.profile.fvwm = true; +} diff --git a/profiles/fvwm/fvwm.nix b/profiles/fvwm/fvwm.nix new file mode 100644 index 00000000..a77dd873 --- /dev/null +++ b/profiles/fvwm/fvwm.nix @@ -0,0 +1,10 @@ +{ config, pkgs, lib, ... }: + +{ + services.xserver.enable = true; + services.xserver.displayManager.startx.enable = true; + services.xserver.windowManager.fvwm = { + enable = true; + gestures = true; + }; +} diff --git a/users/kairi/base.nix b/users/kairi/base.nix new file mode 100644 index 00000000..409cb9c8 --- /dev/null +++ b/users/kairi/base.nix @@ -0,0 +1,20 @@ +{ config, pkgs, lib, ... }: + +{ + home-manager.users.kairi = { + imports = [ ./base ]; + home.stateVersion = "20.09"; + }; + + users.users.kairi = { + uid = 1003; + 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."; + }; +} diff --git a/users/kairi/base/base16.nix b/users/kairi/base/base16.nix new file mode 100644 index 00000000..1f77b680 --- /dev/null +++ b/users/kairi/base/base16.nix @@ -0,0 +1,12 @@ +{ config, ... }: + +{ + base16 = { + shell.enable = true; + schemes = [ "rebecca.rebecca" ]; + }; + # home.base16-shell = { + # enable = true; + # defaultTheme = "rebecca.rebecca"; + # }; +} diff --git a/users/kairi/base/default.nix b/users/kairi/base/default.nix new file mode 100644 index 00000000..da44b006 --- /dev/null +++ b/users/kairi/base/default.nix @@ -0,0 +1,19 @@ +{ ... }: + +{ + 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 + ]; +} diff --git a/users/kairi/base/git.nix b/users/kairi/base/git.nix new file mode 100644 index 00000000..99387e52 --- /dev/null +++ b/users/kairi/base/git.nix @@ -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; + }; + }; +} diff --git a/users/kairi/base/inputrc.nix b/users/kairi/base/inputrc.nix new file mode 100644 index 00000000..8950b4b1 --- /dev/null +++ b/users/kairi/base/inputrc.nix @@ -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"; +} diff --git a/users/kairi/base/kitty.nix b/users/kairi/base/kitty.nix new file mode 100644 index 00000000..bcea5f5a --- /dev/null +++ b/users/kairi/base/kitty.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ... }: + +{ +# home.sessionVariables.TERMINFO_DIRS = +# "${pkgs.kitty.terminfo.outPath}/share/terminfo"; +} diff --git a/users/kairi/base/nano.png b/users/kairi/base/nano.png new file mode 100644 index 00000000..073e24c2 Binary files /dev/null and b/users/kairi/base/nano.png differ diff --git a/users/kairi/base/packages.nix b/users/kairi/base/packages.nix new file mode 100644 index 00000000..e1930303 --- /dev/null +++ b/users/kairi/base/packages.nix @@ -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 + ]; +} diff --git a/users/kairi/base/rink.nix b/users/kairi/base/rink.nix new file mode 100644 index 00000000..984e72ae --- /dev/null +++ b/users/kairi/base/rink.nix @@ -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"; + }; + }; + }; +} diff --git a/users/kairi/base/secrets.nix b/users/kairi/base/secrets.nix new file mode 100644 index 00000000..f4cd72b2 --- /dev/null +++ b/users/kairi/base/secrets.nix @@ -0,0 +1,9 @@ +{ config, lib, ... }: + +{ + secrets = { + persistentRoot = config.xdg.cacheHome + "/kat/secrets"; + external = true; + }; +} + diff --git a/users/kairi/base/ssh.nix b/users/kairi/base/ssh.nix new file mode 100644 index 00000000..8627dff5 --- /dev/null +++ b/users/kairi/base/ssh.nix @@ -0,0 +1,27 @@ +{ 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; + }; + }; +} diff --git a/users/kairi/base/tmux.nix b/users/kairi/base/tmux.nix new file mode 100644 index 00000000..2c2ab5e0 --- /dev/null +++ b/users/kairi/base/tmux.nix @@ -0,0 +1,53 @@ +{ 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 + ''; + }; +} diff --git a/users/kairi/base/vim/default.nix b/users/kairi/base/vim/default.nix new file mode 100644 index 00000000..23a9c6fa --- /dev/null +++ b/users/kairi/base/vim/default.nix @@ -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; # 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..? + ]; + }; + }; +} diff --git a/users/kairi/base/vim/vimrc.nix b/users/kairi/base/vim/vimrc.nix new file mode 100644 index 00000000..8577b013 --- /dev/null +++ b/users/kairi/base/vim/vimrc.nix @@ -0,0 +1,200 @@ +{ 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! \w" | execute 'buffer'.buf | endif + nnoremap n :NERDTreeFocus + nnoremap :NERDTree + nnoremap :NERDTreeToggle + nnoremap :NERDTreeFind + + 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 + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() + inoremap pumvisible() ? "\" : "\" + + function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' + endfunction + + " Use to trigger completion. + if has('nvim') + inoremap coc#refresh() + else + inoremap coc#refresh() + endif + + " Make auto-select the first completion item and notify coc.nvim to + " format on enter, could be remapped by other vim plugin + noremap pumvisible() ? coc#_select_confirm() + \: "\u\\=coc#on_enter()\" + + " Use `[g` and `]g` to navigate diagnostics + " Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. + nmap [g (coc-diagnostic-prev) + nmap ]g (coc-diagnostic-next) + + " GoTo code navigation. + nmap gd (coc-definition) + nmap gy (coc-type-definition) + nmap gi (coc-implementation) + nmap gr (coc-references) + + " Use K to show documentation in preview window. + nnoremap K :call show_documentation() + + function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + elseif (coc#rpc#ready()) + call CocActionAsync('doHover') + else + execute '!' . &keywordprg . " " . expand('') + endif + endfunction + + " Highlight the symbol and its references when holding the cursor. + autocmd CursorHold * silent call CocActionAsync('highlight') + + " Symbol renaming. + nmap rn (coc-rename) + + " Formatting selected code. + xmap f (coc-format-selected) + nmap f (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: `aap` for current paragraph + xmap a (coc-codeaction-selected) + nmap a (coc-codeaction-selected) + + " Remap keys for applying codeAction to the current buffer. + nmap ac (coc-codeaction) + " Apply AutoFix to problem on the current line. + nmap qf (coc-fix-current) + + " Map function and class text objects + " NOTE: Requires 'textDocument.documentSymbol' support from the language server. + xmap if (coc-funcobj-i) + omap if (coc-funcobj-i) + xmap af (coc-funcobj-a) + omap af (coc-funcobj-a) + xmap ic (coc-classobj-i) + omap ic (coc-classobj-i) + xmap ac (coc-classobj-a) + omap ac (coc-classobj-a) + + " Remap and for scroll float windows/popups. + if has('nvim-0.4.0') || has('patch-8.2.0750') + nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" + nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" + vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" + vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" + endif + + " Use CTRL-S for selections ranges. + " Requires 'textDocument/selectionRange' support of language server. + nmap (coc-range-select) + xmap (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', ) + + " 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 a :CocList diagnostics + " Manage extensions. + nnoremap e :CocList extensions + " Show commands. + nnoremap c :CocList commands + " Find symbol of current document. + nnoremap o :CocList outline + " Search workspace symbols. + nnoremap s :CocList -I symbols + " Do default action for next item. + nnoremap j :CocNext + " Do default action for previous item. + nnoremap k :CocPrev + " Resume latest coc list. + nnoremap p :CocListResume + +'' diff --git a/users/kairi/base/weechat.nix b/users/kairi/base/weechat.nix new file mode 100644 index 00000000..1d9754f8 --- /dev/null +++ b/users/kairi/base/weechat.nix @@ -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 = 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}"; + "``" = "/input jump_last_buffer_displayed"; + "`n" = "/input jump_smart"; + "k" = "/input history_previous"; + "j" = "/input history_next"; + "p" = "a/input clipboard_paste"; + "P" = "/input clipboard_paste"; + #"u" = "/input undo"; + #"\\x01R" = "/input redo"; + "\\x01K" = "/buffer move -1"; + "\\x01J" = "/buffer move +1"; + }; + 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"; + }; + }; + }; + }; +} diff --git a/users/kairi/base/xdg.nix b/users/kairi/base/xdg.nix new file mode 100644 index 00000000..690c0b15 --- /dev/null +++ b/users/kairi/base/xdg.nix @@ -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"; + }; + }; +} diff --git a/users/kairi/base/zsh.nix b/users/kairi/base/zsh.nix new file mode 100644 index 00000000..fc29bdc1 --- /dev/null +++ b/users/kairi/base/zsh.nix @@ -0,0 +1,87 @@ +{ 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; + }; +} diff --git a/users/kairi/default.nix b/users/kairi/default.nix new file mode 100644 index 00000000..5da73ea2 --- /dev/null +++ b/users/kairi/default.nix @@ -0,0 +1,12 @@ +rec { + base = ./base.nix; + gui = ./gui.nix; + fvwm = ./fvwm.nix; + sway = ./sway.nix; + dev = ./dev.nix; + media = ./media.nix; + personal = ./personal.nix; + + server = { imports = [ personal ]; }; + guiFull = { imports = [ gui fvwm dev media personal ]; }; +} diff --git a/users/kairi/dev.nix b/users/kairi/dev.nix new file mode 100644 index 00000000..5c44e68e --- /dev/null +++ b/users/kairi/dev.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + home-manager.users.kairi = { imports = [ ./dev ]; }; +} diff --git a/users/kairi/dev/cookiecutter.nix b/users/kairi/dev/cookiecutter.nix new file mode 100644 index 00000000..da4dc718 --- /dev/null +++ b/users/kairi/dev/cookiecutter.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + home.packages = with pkgs; [ cookiecutter ]; + + home.shell.functions.katenv = '' + cookiecutter cookiecutters --directory $1 + ''; +} diff --git a/users/kairi/dev/default.nix b/users/kairi/dev/default.nix new file mode 100644 index 00000000..708b355c --- /dev/null +++ b/users/kairi/dev/default.nix @@ -0,0 +1,5 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./packages.nix ./cookiecutter.nix ]; +} diff --git a/users/kairi/dev/packages.nix b/users/kairi/dev/packages.nix new file mode 100644 index 00000000..ce72a4a8 --- /dev/null +++ b/users/kairi/dev/packages.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + home.packages = with pkgs; [ hyperfine hexyl tokei horizon-eda ]; +} diff --git a/users/kairi/fvwm.nix b/users/kairi/fvwm.nix new file mode 100644 index 00000000..a50adf9d --- /dev/null +++ b/users/kairi/fvwm.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + home-manager.users.kairi = { imports = [ ./fvwm ]; }; +} diff --git a/users/kairi/fvwm/default.nix b/users/kairi/fvwm/default.nix new file mode 100644 index 00000000..c2f8704a --- /dev/null +++ b/users/kairi/fvwm/default.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + home.file = { + ".xinitrc" = { + executable = true; + text = '' + #!${pkgs.bash}/bin/bash + exec fvwm + ''; + }; + }; +} diff --git a/users/kairi/gui.nix b/users/kairi/gui.nix new file mode 100644 index 00000000..4448b550 --- /dev/null +++ b/users/kairi/gui.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + home-manager.users.kairi = { imports = [ ./gui ]; }; +} diff --git a/users/kairi/gui/default.nix b/users/kairi/gui/default.nix new file mode 100644 index 00000000..3a4cd3aa --- /dev/null +++ b/users/kairi/gui/default.nix @@ -0,0 +1,9 @@ +{ 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; +} diff --git a/users/kairi/gui/firefox/default.nix b/users/kairi/gui/firefox/default.nix new file mode 100644 index 00000000..d97933fb --- /dev/null +++ b/users/kairi/gui/firefox/default.nix @@ -0,0 +1,58 @@ +{ 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/kairi/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"; }; + }; + }; + }; +} diff --git a/users/kairi/gui/firefox/userChrome.css.nix b/users/kairi/gui/firefox/userChrome.css.nix new file mode 100644 index 00000000..12d10908 --- /dev/null +++ b/users/kairi/gui/firefox/userChrome.css.nix @@ -0,0 +1,15 @@ +{ 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; + } +'' diff --git a/users/kairi/gui/foot.nix b/users/kairi/gui/foot.nix new file mode 100644 index 00000000..2b31bac9 --- /dev/null +++ b/users/kairi/gui/foot.nix @@ -0,0 +1,21 @@ +{ 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 = "FantasqueSansMono Nerd Font:size=10"; + dpi-aware = "yes"; + }; + }; + }; +} diff --git a/users/kairi/gui/gtk.nix b/users/kairi/gui/gtk.nix new file mode 100644 index 00000000..a986fe6d --- /dev/null +++ b/users/kairi/gui/gtk.nix @@ -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; + }; + }; +} diff --git a/users/kairi/gui/kitty.nix b/users/kairi/gui/kitty.nix new file mode 100644 index 00000000..db87ef99 --- /dev/null +++ b/users/kairi/gui/kitty.nix @@ -0,0 +1,35 @@ +{ 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; + }; +} diff --git a/users/kairi/gui/packages.nix b/users/kairi/gui/packages.nix new file mode 100644 index 00000000..40e30d5e --- /dev/null +++ b/users/kairi/gui/packages.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +{ + home.packages = with pkgs; [ + _1password + bitwarden + wire-desktop + element-desktop + exiftool + thunderbird + mumble-develop + dino + transmission-remote-gtk + scrcpy + lm_sensors + p7zip + zip + unzip + nyxt + baresip + discord + tdesktop + yubikey-manager + vegur + gparted + cryptsetup + ]; +} diff --git a/users/kairi/gui/ranger.nix b/users/kairi/gui/ranger.nix new file mode 100644 index 00000000..0e294078 --- /dev/null +++ b/users/kairi/gui/ranger.nix @@ -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 + ''; +} diff --git a/users/kairi/gui/wezterm.nix b/users/kairi/gui/wezterm.nix new file mode 100644 index 00000000..a9a8bfca --- /dev/null +++ b/users/kairi/gui/wezterm.nix @@ -0,0 +1,42 @@ +{ 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}", + }, + }, + }, + } + ''; +} diff --git a/users/kairi/gui/xdg.nix b/users/kairi/gui/xdg.nix new file mode 100644 index 00000000..abd6c3b9 --- /dev/null +++ b/users/kairi/gui/xdg.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + home.packages = with pkgs; [ + xdg-utils + ]; +} diff --git a/users/kairi/media.nix b/users/kairi/media.nix new file mode 100644 index 00000000..f7037a57 --- /dev/null +++ b/users/kairi/media.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + home-manager.users.kairi = { imports = [ ./media ]; }; +} diff --git a/users/kairi/media/beets.nix b/users/kairi/media/beets.nix new file mode 100644 index 00000000..13203be3 --- /dev/null +++ b/users/kairi/media/beets.nix @@ -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" + ]; + }; + }; +} diff --git a/users/kairi/media/default.nix b/users/kairi/media/default.nix new file mode 100644 index 00000000..9bf2a65f --- /dev/null +++ b/users/kairi/media/default.nix @@ -0,0 +1,13 @@ +{ ... }: + +{ + imports = [ + ./mpv.nix + ./obs.nix + ./syncplay.nix + ./beets.nix + ./mpd.nix + ./ncmpcpp.nix + ./packages.nix + ]; +} diff --git a/users/kairi/media/mpd.nix b/users/kairi/media/mpd.nix new file mode 100644 index 00000000..fe03204c --- /dev/null +++ b/users/kairi/media/mpd.nix @@ -0,0 +1,41 @@ +{ config, pkgs, ... }: + +{ + services.mpd = { + enable = true; + package = pkgs.mpd-youtube-dl; + network = { + startWhenNeeded = true; + listenAddress = "[::]"; + }; + musicDirectory = "/home/kairi/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" + } + ''; + }; +} diff --git a/users/kairi/media/mpv.nix b/users/kairi/media/mpv.nix new file mode 100644 index 00000000..a71665e5 --- /dev/null +++ b/users/kairi/media/mpv.nix @@ -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"; + 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"; + }); + }; + }; + } diff --git a/users/kairi/media/ncmpcpp.nix b/users/kairi/media/ncmpcpp.nix new file mode 100644 index 00000000..d2322adf --- /dev/null +++ b/users/kairi/media/ncmpcpp.nix @@ -0,0 +1,52 @@ +{ config, ... }: + +{ + programs.ncmpcpp = { + enable = true; + mpdMusicDir = "/home/kairi/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"; + } + ]; + }; +} diff --git a/users/kairi/media/obs.nix b/users/kairi/media/obs.nix new file mode 100644 index 00000000..c41cb434 --- /dev/null +++ b/users/kairi/media/obs.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + programs.obs-studio = { + enable = true; + plugins = [ pkgs.obs-studio-plugins.wlrobs ]; + }; + + programs.zsh.shellAliases = { obs = "env QT_QPA_PLATFORM=xcb obs"; }; +} diff --git a/users/kairi/media/packages.nix b/users/kairi/media/packages.nix new file mode 100644 index 00000000..7f0abfc1 --- /dev/null +++ b/users/kairi/media/packages.nix @@ -0,0 +1,22 @@ +{ 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 + ]; +} diff --git a/users/kairi/media/syncplay.nix b/users/kairi/media/syncplay.nix new file mode 100644 index 00000000..f6406bca --- /dev/null +++ b/users/kairi/media/syncplay.nix @@ -0,0 +1,31 @@ +{ 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; + }; + }; + }; +} diff --git a/users/kairi/personal.nix b/users/kairi/personal.nix new file mode 100644 index 00000000..5503a0b7 --- /dev/null +++ b/users/kairi/personal.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + home-manager.users.kairi = { imports = [ ./personal ]; }; +} diff --git a/users/kairi/personal/default.nix b/users/kairi/personal/default.nix new file mode 100644 index 00000000..f49a43e9 --- /dev/null +++ b/users/kairi/personal/default.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + imports = [ ./gpg.nix ./packages.nix ]; +} diff --git a/users/kairi/personal/gpg.nix b/users/kairi/personal/gpg.nix new file mode 100644 index 00000000..466b9708 --- /dev/null +++ b/users/kairi/personal/gpg.nix @@ -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" + ]; + }; +} diff --git a/users/kairi/personal/packages.nix b/users/kairi/personal/packages.nix new file mode 100644 index 00000000..c3b8edec --- /dev/null +++ b/users/kairi/personal/packages.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + home.packages = with pkgs; [ pinentry.gtk2 ]; +} diff --git a/users/kairi/sway.nix b/users/kairi/sway.nix new file mode 100644 index 00000000..b0e6b9c5 --- /dev/null +++ b/users/kairi/sway.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + home-manager.users.kairi = { imports = [ ./sway ]; }; +} diff --git a/users/kairi/sway/default.nix b/users/kairi/sway/default.nix new file mode 100644 index 00000000..b64c5064 --- /dev/null +++ b/users/kairi/sway/default.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + deploy.profile.sway = true; + + imports = [ + ./waybar + ./mako.nix + ./sway.nix + ./gammastep.nix + ./konawall.nix + ./packages.nix + ]; +} diff --git a/users/kairi/sway/gammastep.nix b/users/kairi/sway/gammastep.nix new file mode 100644 index 00000000..ce3ba1c1 --- /dev/null +++ b/users/kairi/sway/gammastep.nix @@ -0,0 +1,9 @@ +{ config, lib, ... }: + +{ + services.gammastep = { + enable = true; + latitude = "51.5074"; + longitude = "0.1278"; + }; +} diff --git a/users/kairi/sway/konawall.nix b/users/kairi/sway/konawall.nix new file mode 100644 index 00000000..49434241 --- /dev/null +++ b/users/kairi/sway/konawall.nix @@ -0,0 +1,5 @@ +{ config, ... }: + +{ + services.konawall = { enable = true; }; +} diff --git a/users/kairi/sway/mako.nix b/users/kairi/sway/mako.nix new file mode 100644 index 00000000..2b3a6204 --- /dev/null +++ b/users/kairi/sway/mako.nix @@ -0,0 +1,35 @@ +{ 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; + }; +} diff --git a/users/kairi/sway/packages.nix b/users/kairi/sway/packages.nix new file mode 100644 index 00000000..a4fabfaf --- /dev/null +++ b/users/kairi/sway/packages.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + home.packages = with pkgs; [ kat-scrot ]; +} diff --git a/users/kairi/sway/sway.nix b/users/kairi/sway/sway.nix new file mode 100644 index 00000000..06d69f94 --- /dev/null +++ b/users/kairi/sway/sway.nix @@ -0,0 +1,232 @@ +{ 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"; + 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.wezterm}/bin/wezterm"; + # 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 = true; + }; + + 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.base0B; + childBorder = base16.base08; + }; + focusedInactive = { + border = base16.base00; + background = base16.base07; + text = base16.base0A; + indicator = base16.base0B; + childBorder = base16.base03; + }; + unfocused = { + border = base16.base00; + background = base16.base01; + text = base16.base04; + indicator = base16.base08; + childBorder = base16.base08; + }; + urgent = { + border = base16.base00; + background = base16.base09; + text = base16.base00; + indicator = base16.base01; + childBorder = base16.base08; + }; + }; + }; + wrapperFeatures.gtk = true; + extraConfig = '' + seat seat0 xcursor_theme breeze_cursors 20 + workspace_auto_back_and_forth yes + ${workspaceBindingsStr} + ''; + }; + +} diff --git a/users/kairi/sway/wallpapers/left.jpg b/users/kairi/sway/wallpapers/left.jpg new file mode 100644 index 00000000..f519c4d4 Binary files /dev/null and b/users/kairi/sway/wallpapers/left.jpg differ diff --git a/users/kairi/sway/wallpapers/main.png b/users/kairi/sway/wallpapers/main.png new file mode 100644 index 00000000..67649a5f Binary files /dev/null and b/users/kairi/sway/wallpapers/main.png differ diff --git a/users/kairi/sway/wallpapers/right.jpg b/users/kairi/sway/wallpapers/right.jpg new file mode 100644 index 00000000..9ab53754 Binary files /dev/null and b/users/kairi/sway/wallpapers/right.jpg differ diff --git a/users/kairi/sway/waybar/default.nix b/users/kairi/sway/waybar/default.nix new file mode 100644 index 00000000..57adeba4 --- /dev/null +++ b/users/kairi/sway/waybar/default.nix @@ -0,0 +1,116 @@ +{ 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" "custom/weather" + modules-right = [ + "pulseaudio" + "cpu" + "memory" + "temperature" + "backlight" + "battery" + #"mpd" + "network" + "custom/gpg-status" + #"custom/weather" + "clock" + "idle_inhibitor" + "tray" + ]; + + modules = { + "sway/workspaces" = { format = "{name}"; }; + #"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 = " {usage}%"; }; + #mpd = { + # format = " {albumArtist} - {title}"; + # format-stopped = "ﱙ"; + # format-paused = " Paused"; + # title-len = 16; + #}; + memory = { format = " {percentage}%"; }; + temperature = { format = "﨎{temperatureC}°C"; }; + 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 = " {volume}%"; + on-click = "pavucontrol"; + }; + network = { + format-wifi = ""; + format-ethernet = ""; + format-linked = " {ifname} (No IP)"; + format-disconnected = " Disconnected "; + format-alt = " {ifname}: {ipaddr}/{cidr}"; + tooltip-format-wifi = "{essid} ({signalStrength}%)"; + }; + clock = { + format = " {:%T %z}"; + tooltip = true; + tooltip-format = "{:%A, %F %T %z (%Z)}"; + timezones = [ + "Europe/London" + "America/Vancouver" + "America/Chicago" + "Europe/Berlin" + "Pacific/Auckland" + ]; + interval = 1; + }; + }; + }]; + }; + }; +} diff --git a/users/kairi/sway/waybar/waybar.css.nix b/users/kairi/sway/waybar/waybar.css.nix new file mode 100644 index 00000000..8a5be1ce --- /dev/null +++ b/users/kairi/sway/waybar/waybar.css.nix @@ -0,0 +1,73 @@ +{ hextorgba, base16, font }: + +'' + * { + border: none; + border-radius: 0; + font-family: "${font.name}"; + font-size: ${font.size_css}; + min-height: 14px + } + + #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; + border-bottom: 2px solid ${base16.base00}; + color: ${base16.base05} + } + + window#waybar { background: ${hextorgba base16.base00} } + + #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: ${hextorgba base16.base02}; + font-size: 16px; + margin: 0px 4px 0px 4px; + border-bottom: 2px solid transparent; + border-left: 1px solid ${base16.base07}; + border-right: 1px solid ${base16.base07} + } + + #workspaces button:last-child { margin-right: 0px } + + #workspaces button.focused { + color: ${base16.base0A}; + border-bottom-color: ${base16.base0A} + } + + #workspaces button:hover { + transition: none; + box-shadow: inherit; + text-shadow: inherit; + color: ${base16.base0F}; + border-bottom-color: ${base16.base0F} + } + + #mpd, #idle_inhibitor { border-color: #5af78e } + #mpd.disconnected, #mpd.stopped { border-color: #282a36 } + #network { border-color: ${base16.base08} } + #custom-weather { border-color: ${base16.base00} } + #custom-gpg-status { border-color: ${base16.base09} } + #pulseaudio { border-color: ${base16.base0A} } + #temperature { border-color: ${base16.base0B} } + #battery { border-color: ${base16.base0C} } + #backlight { border-color: ${base16.base0D} } + #cpu { border-color: ${base16.base0E} } + #memory { border-color: ${base16.base0F} } + #clock { border-color: ${base16.base06} } +''