my laptops nixos configuration, hopefully less messy this time (but still a lil' messy)
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.

45 lines
1.2KB

  1. { pkgs, config, ... } :
  2. let
  3. wrapPlugin = { name, pkg }: {
  4. inherit name;
  5. src = pkg + "/share/zsh/site-functions";
  6. };
  7. in {
  8. home.packages = [
  9. pkgs.swatch
  10. ];
  11. programs.zsh = {
  12. enable = true;
  13. enableAutosuggestions = true;
  14. enableCompletion = true;
  15. dotDir = ".config/zsh";
  16. history = {
  17. expireDuplicatesFirst = true;
  18. extended = true;
  19. ignoreDups = true;
  20. share = true;
  21. };
  22. initExtraBeforeCompInit = ''
  23. export PATH='/run/wrappers/bin:/home/thorn/.nix-profile/bin:/etc/profiles/per-user/thorn/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/thorn/.config/zsh/plugins/fast-syntax-highlighting'
  24. '';
  25. initExtra = ''
  26. setopt promptsubst
  27. autoload -U colors && colors
  28. export PROMPT='%{$fg[white]%}%B$(swatch)%b %{$fg[blue]%}%2~ %{$fg[green]%}%B>%b '
  29. '';
  30. shellAliases = {
  31. nf = "neofetch --gtk2 off --gtk3 off --ascii_bold on";
  32. ls = "ls --color";
  33. ec = "emacsclient";
  34. };
  35. plugins = (map wrapPlugin [
  36. { name = "fast-syntax-highlighting";
  37. pkg = pkgs.zsh-fast-syntax-highlighting;
  38. }
  39. ]);
  40. };
  41. programs.dircolors.enableZshIntegration = true;
  42. }