files.nix 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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/nix-dots"
  20. nix flake update
  21. nh os 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. XCOMPOSEFILE=$HOME/.XCompose
  30. '';
  31. };
  32. kdeglobals = {
  33. target = ".config/kdeglobals";
  34. text = ''
  35. [UiSettings]
  36. ColorScheme=BreezeDark
  37. [KDE]
  38. ShowDeleteCommand=true
  39. [KFileDialog Settings]
  40. Allow Expansion=false
  41. Automatically select filename extension=true
  42. Breadcrumb Navigation=true
  43. Decoration position=2
  44. Show Full Path=false
  45. Show Inline Previews=true
  46. Show Preview=false
  47. Show Speedbar=true
  48. Show hidden files=false
  49. Sort by=Name
  50. Sort directories first=true
  51. Sort hidden files last=false
  52. Sort reversed=false
  53. Speedbar Width=144
  54. View Style=Simple
  55. [PreviewSettings]
  56. EnableRemoteFolderThumbnail=false
  57. MaximumRemoteSize=0
  58. '';
  59. };
  60. xcompose = {
  61. target = ".XCompose";
  62. text = ''
  63. include "%L"
  64. <Multi_key> <comma> : "̨" U0328
  65. '';
  66. };
  67. };
  68. };
  69. }