files.nix 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. sudo nixos-rebuild switch --flake .#nixstation
  21. flatpak update -y
  22. sudo flatpak update -y
  23. cd "$ORIG_CWD"
  24. }
  25. jclone() {
  26. git clone https://github.com/johron/$1
  27. }
  28. '';
  29. };
  30. kdeglobals = {
  31. target = ".config/kdeglobals";
  32. text = ''
  33. [UiSettings]
  34. ColorScheme=BreezeDark
  35. [KDE]
  36. ShowDeleteCommand=true
  37. [KFileDialog Settings]
  38. Allow Expansion=false
  39. Automatically select filename extension=true
  40. Breadcrumb Navigation=true
  41. Decoration position=2
  42. Show Full Path=false
  43. Show Inline Previews=true
  44. Show Preview=false
  45. Show Speedbar=true
  46. Show hidden files=false
  47. Sort by=Name
  48. Sort directories first=true
  49. Sort hidden files last=false
  50. Sort reversed=false
  51. Speedbar Width=144
  52. View Style=Simple
  53. [PreviewSettings]
  54. EnableRemoteFolderThumbnail=false
  55. MaximumRemoteSize=0
  56. '';
  57. };
  58. };
  59. };
  60. }