dev-common.nix 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {
  2. config,
  3. pkgs,
  4. lib,
  5. ...
  6. }:
  7. let
  8. inherit (lib) optionals;
  9. in
  10. {
  11. imports = [
  12. ./common.nix
  13. ./clojure.nix
  14. ];
  15. home.packages =
  16. with pkgs;
  17. [
  18. docker
  19. docker-compose
  20. docker-credential-helpers
  21. gopass-jsonapi
  22. multimarkdown
  23. neovim
  24. ripgrep-all
  25. ]
  26. ++ optionals (!stdenv.isDarwin) [
  27. ffmpeg
  28. mpv
  29. ];
  30. programs.tmux = {
  31. enable = true;
  32. terminal = "screen-256color";
  33. prefix = "C-x";
  34. plugins = with pkgs; [
  35. tmuxPlugins.copy-toolkit
  36. tmuxPlugins.copycat
  37. tmuxPlugins.extrakto
  38. tmuxPlugins.fuzzback
  39. tmuxPlugins.fzf-tmux-url
  40. tmuxPlugins.jump
  41. {
  42. plugin = tmuxPlugins.open;
  43. extraConfig = ''
  44. set -g @open-S 'https://www.duckduckgo.com/?q='
  45. '';
  46. }
  47. {
  48. plugin = tmuxPlugins.tmux-thumbs;
  49. extraConfig = ''
  50. set -g @thumbs-reverse enabled
  51. set -g @thumbs-unique enabled
  52. set -g @thumbs-position right
  53. set -g @thumbs-contrast 1
  54. #${lib.optionalString pkgs.stdenv.isLinux "set -g @thumbs-upcase-command 'xargs xdg-open {}'"}
  55. #${lib.optionalString pkgs.stdenv.isDarwin "set -g @thumbs-upcase-command 'xargs open {}'"}
  56. '';
  57. }
  58. ];
  59. extraConfig = ''
  60. unbind-key R
  61. bind-key R run-shell ' \
  62. tmux source-file ~/.config/tmux/tmux.conf > /dev/null; \
  63. tmux display-message "Sourced .config/tmux/tmux.conf!"'
  64. bind-key £ split-window -h
  65. set-option -g status-bg '#666666'
  66. set-option -g status-fg '#aaaaaa'
  67. set-option -g status-left-length 50
  68. set-option -g status-right " %a, %b %d - %H:%M "
  69. ${lib.optionalString pkgs.stdenv.isLinux ''
  70. bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
  71. bind-key C-y run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
  72. ''}
  73. ${lib.optionalString pkgs.stdenv.isDarwin ''
  74. bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
  75. bind-key C-y run "reattach-to-user-namespace pbpaste | tmux load-buffer - ; tmux paste-buffer"
  76. ''}
  77. '';
  78. };
  79. }