files.nix 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. { pkgs, lib, ... }:
  2. {
  3. home = {
  4. file = {
  5. bashrc = {
  6. target = ".bashrc";
  7. text = ''
  8. current_git_branch() {
  9. git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
  10. }
  11. shlvl_prompt() {
  12. (( SHLVL > 1 )) && printf '(%d)' "$SHLVL"
  13. }
  14. PS1='$(shlvl_prompt)(\[\033[01;94m\]\u\[\033[00;00m\]@\[\033[01;94m\]\h\[\033[00;00m\]:\[\033[01;34m\]\w\[\033[00m\])\[\033[01;32m\]$(current_git_branch)\[\033[00m\]$ '
  15. nix-update() {
  16. set -e
  17. ORIG_CWD="$(pwd)"
  18. sudo nix-channel --update
  19. cd "$HOME/home-manager"
  20. make
  21. sudo nixos-rebuild switch
  22. flatpak update -y
  23. sudo flatpak update -y
  24. cd "$ORIG_CWD"
  25. }
  26. jclone() {
  27. git clone https://github.com/johron/$1
  28. }
  29. '';
  30. };
  31. kdeglobals = {
  32. target = ".config/kdeglobals";
  33. text = ''
  34. [UiSettings]
  35. ColorScheme=BreezeDark
  36. [KDE]
  37. ShowDeleteCommand=true
  38. [KFileDialog Settings]
  39. Allow Expansion=false
  40. Automatically select filename extension=true
  41. Breadcrumb Navigation=true
  42. Decoration position=2
  43. Show Full Path=false
  44. Show Inline Previews=true
  45. Show Preview=false
  46. Show Speedbar=true
  47. Show hidden files=false
  48. Sort by=Name
  49. Sort directories first=true
  50. Sort hidden files last=false
  51. Sort reversed=false
  52. Speedbar Width=144
  53. View Style=Simple
  54. [PreviewSettings]
  55. EnableRemoteFolderThumbnail=false
  56. MaximumRemoteSize=0
  57. '';
  58. };
  59. };
  60. };
  61. }