I showed you my source code, pls respond
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.

157 lines
3.7 KiB

3 years ago
3 years ago
1 year ago
3 years ago
1 year ago
3 years ago
3 years ago
  1. # This file is controlled by /etc/dotfiles/README.org
  2. # This module MUST be included within home manager
  3. { pkgs, ... }:
  4. let
  5. myEmacs = pkgs.emacsWithPackagesFromUsePackage {
  6. config = ../README.org;
  7. package = pkgs.emacs-unstable;
  8. alwaysEnsure = true;
  9. alwaysTangle = true;
  10. extraEmacsPackages = epkgs: [
  11. # Required packages...
  12. epkgs.exwm
  13. epkgs.evil
  14. epkgs.evil-collection
  15. epkgs.evil-surround
  16. epkgs.evil-nerd-commenter
  17. epkgs.general
  18. epkgs.which-key
  19. # Optional packages.
  20. epkgs.org
  21. epkgs.org-roam
  22. epkgs.org-roam-ui
  23. epkgs.websocket
  24. epkgs.simple-httpd
  25. epkgs.org-drill
  26. epkgs.org-pomodoro
  27. epkgs.writegood-mode
  28. epkgs.ob-http
  29. epkgs.ox-hugo
  30. epkgs.password-store
  31. epkgs.docker
  32. epkgs.dockerfile-mode
  33. epkgs.mu4e-alert
  34. epkgs.dired-single
  35. epkgs.nerd-icons
  36. epkgs.all-the-icons
  37. epkgs.all-the-icons-dired
  38. epkgs.all-the-icons-ivy-rich
  39. epkgs.emojify
  40. epkgs.eshell-prompt-extras
  41. epkgs.vterm
  42. epkgs.multi-vterm
  43. epkgs.magit
  44. epkgs.hydra
  45. epkgs.ligature
  46. epkgs.elfeed
  47. epkgs.nix-mode
  48. epkgs.projectile
  49. epkgs.lsp-mode
  50. epkgs.lsp-ui
  51. epkgs.company
  52. epkgs.gdscript-mode
  53. epkgs.ccls
  54. epkgs.go-mode
  55. epkgs.dart-mode
  56. epkgs.lsp-dart
  57. epkgs.hover
  58. epkgs.pretty-mode
  59. epkgs.rustic
  60. epkgs.protobuf-mode
  61. epkgs.typescript-mode
  62. epkgs.yaml-mode
  63. epkgs.plantuml-mode
  64. # User interface packages.
  65. epkgs.neotree
  66. epkgs.ivy
  67. epkgs.counsel
  68. epkgs.ivy-rich
  69. epkgs.ivy-posframe
  70. epkgs.ivy-prescient
  71. epkgs.desktop-environment
  72. epkgs.doom-themes
  73. epkgs.doom-modeline
  74. ];
  75. };
  76. in {
  77. home.packages = [
  78. pkgs.arandr
  79. pkgs.nitrogen
  80. pkgs.autorandr
  81. pkgs.pass
  82. (pkgs.writeShellScriptBin "pass-init" ''
  83. ${pkgs.git}/bin/git clone git@git.chrishayward.xyz:chris/passwords /home/chris/.password-store
  84. ${pkgs.pass}/bin/pass init
  85. '')
  86. pkgs.mu
  87. pkgs.isync
  88. (pkgs.writeShellScriptBin "mail-init" ''
  89. ${pkgs.mu}/bin/mu init --maildir="/home/chris/.cache/mail" --my-address="chris@chrishayward.xyz"
  90. ${pkgs.mu}/bin/mu index
  91. '')
  92. (pkgs.writeShellScriptBin "mail-sync" ''
  93. ${pkgs.isync}/bin/mbsync -a
  94. '')
  95. pkgs.aspell
  96. pkgs.aspellDicts.en
  97. pkgs.aspellDicts.en-science
  98. pkgs.aspellDicts.en-computers
  99. # pkgs.texlive.combined.scheme-full
  100. pkgs.brightnessctl
  101. pkgs.plantuml
  102. pkgs.nixfmt
  103. pkgs.rnix-lsp
  104. (pkgs.writeShellScriptBin "dotfiles-theme" ''
  105. ${myEmacs}/bin/emacsclient --no-wait --eval '(json-encode (dotfiles/theme))' | sed "s/\\\\//g" | sed -e 's/^"//' -e 's/"$//'
  106. '')
  107. ];
  108. programs.emacs = {
  109. enable = true;
  110. package = myEmacs;
  111. };
  112. xsession = {
  113. enable = true;
  114. windowManager.command = ''
  115. ${pkgs.nitrogen}/bin/nitrogen --restore
  116. ${myEmacs}/bin/emacs --daemon -f exwm-enable
  117. ${myEmacs}/bin/emacsclient -c
  118. '';
  119. };
  120. home.file.".xinitrc" = {
  121. text = ''
  122. exec ./.xsession
  123. '';
  124. };
  125. # Deploy the authinfo file.
  126. home.file.".authinfo.gpg".source = ../config/authinfo.gpg;
  127. # Deploy the isync configuration file.
  128. home.file.".mbsyncrc" = {
  129. text = ''
  130. IMAPStore xyz-remote
  131. Host mail.chrishayward.xyz
  132. User chris@chrishayward.xyz
  133. PassCmd "pass chrishayward.xyz/chris"
  134. SSLType IMAPS
  135. MaildirStore xyz-local
  136. Path ~/.cache/mail/
  137. Inbox ~/.cache/mail/inbox
  138. SubFolders Verbatim
  139. Channel xyz
  140. Far :xyz-remote:
  141. Near :xyz-local:
  142. Patterns * !Archives
  143. Create Both
  144. Expunge Both
  145. SyncState *
  146. '';
  147. };
  148. }