1
0

files.nix 2.0 KB

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