nixos configurations
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.8 KiB

4 months ago
4 months ago
4 months ago
  1. {pkgs, settings, ...}:
  2. {
  3. home.file = {
  4. ".config/zsh/plugins/zsh-autosuggestions".source = "${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions";
  5. ".config/zsh/plugins/fast-syntax-highlighting".source = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
  6. ".config/zsh/plugins/nix-zsh-completions".source = "${pkgs.nix-zsh-completions}/share/zsh/plugins/nix";
  7. ".config/zsh/plugins/pure".source = "${pkgs.pure-prompt}/share/zsh/site-functions";
  8. ".config/zsh/functions".source = ../../dotfiles/.config/zsh/functions;
  9. ".config/zsh/keybinds.zsh".source = ../../dotfiles/.config/zsh/keybinds.zsh;
  10. };
  11. programs.zsh = {
  12. enable = true;
  13. dotDir = ".config/zsh";
  14. envExtra = ''
  15. export EDITOR="vim"
  16. export TERMINAL="konsole"
  17. export TERM="konsole"
  18. export BROWSER="firefox"
  19. export VIDEO="mpv"
  20. export OPENER="xdg-open"
  21. '';
  22. initExtra = ''
  23. # Set emacs key binding.
  24. bindkey -e
  25. # Import functions.
  26. source "$ZDOTDIR/functions"
  27. # Set custom key bindings.
  28. zsh_add_config keybinds.zsh
  29. # Configure pure-prompt.
  30. export PURE_PROMPT_SYMBOL="$"
  31. if [ "$USER" = "root" ]; then
  32. export PURE_PROMPT_SYMBOL="#"
  33. fi
  34. export PROMPT_PURE_SSH_CONNECTION=YES
  35. zsh_fpath_plugin sindresorhus/pure
  36. autoload -U promptinit; promptinit
  37. zstyle :prompt:pure:user color cyan
  38. zstyle :prompt:pure:host color white
  39. zstyle ':prompt:pure:prompt:*' color white
  40. prompt pure
  41. # Add extra plugins.
  42. zsh_add_plugin zdharma-continuum/fast-syntax-highlighting
  43. ZSH_AUTOSUGGEST_STRATEGY=(history completion)
  44. zsh_add_plugin zsh-users/zsh-autosuggestions
  45. # Show off the system.
  46. ${pkgs.fastfetch}/bin/fastfetch
  47. '';
  48. };
  49. }