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.

148 lines
3.4 KiB

3 years ago
3 years ago
1 year ago
3 years 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.magit
  43. epkgs.hydra
  44. epkgs.elfeed
  45. epkgs.nix-mode
  46. epkgs.projectile
  47. epkgs.lsp-mode
  48. epkgs.lsp-ui
  49. epkgs.company
  50. epkgs.gdscript-mode
  51. epkgs.ccls
  52. epkgs.go-mode
  53. epkgs.dart-mode
  54. epkgs.lsp-dart
  55. epkgs.hover
  56. epkgs.pretty-mode
  57. epkgs.rustic
  58. epkgs.protobuf-mode
  59. epkgs.typescript-mode
  60. epkgs.plantuml-mode
  61. # User interface packages.
  62. epkgs.ivy
  63. epkgs.counsel
  64. epkgs.ivy-rich
  65. epkgs.ivy-posframe
  66. epkgs.ivy-prescient
  67. epkgs.desktop-environment
  68. epkgs.doom-themes
  69. epkgs.doom-modeline
  70. ];
  71. };
  72. in {
  73. home.packages = [
  74. pkgs.nitrogen
  75. pkgs.autorandr
  76. pkgs.pass
  77. pkgs.mu
  78. pkgs.isync
  79. (pkgs.writeShellScriptBin "mail-init" ''
  80. ${pkgs.mu} init --maildir="~/.cache/mail" --my-address="chris@chrishayward.xyz"
  81. ${pkgs.mu} index
  82. '')
  83. (pkgs.writeShellScriptBin "mail-sync" ''
  84. ${pkgs.isync}/bin/mbsync -a
  85. '')
  86. pkgs.aspell
  87. pkgs.aspellDicts.en
  88. pkgs.aspellDicts.en-science
  89. pkgs.aspellDicts.en-computers
  90. # pkgs.texlive.combined.scheme-full
  91. pkgs.brightnessctl
  92. pkgs.plantuml
  93. pkgs.nixfmt
  94. pkgs.rnix-lsp
  95. (pkgs.writeShellScriptBin "dotfiles-theme" ''
  96. ${myEmacs}/bin/emacsclient --no-wait --eval '(json-encode (dotfiles/theme))' | sed "s/\\\\//g" | sed -e 's/^"//' -e 's/"$//'
  97. '')
  98. ];
  99. programs.emacs = {
  100. enable = true;
  101. package = myEmacs;
  102. };
  103. xsession = {
  104. enable = true;
  105. windowManager.command = ''
  106. ${pkgs.nitrogen}/bin/nitrogen --restore
  107. ${myEmacs}/bin/emacs --daemon -f exwm-enable
  108. ${myEmacs}/bin/emacsclient -c
  109. '';
  110. };
  111. home.file.".xinitrc" = {
  112. text = ''
  113. exec ./.xsession
  114. '';
  115. };
  116. # Deploy the authinfo file.
  117. home.file.".authinfo.gpg".source = ../config/authinfo.gpg;
  118. # Deploy the isync configuration file.
  119. home.file.".mbsyncrc" = {
  120. text = ''
  121. IMAPStore xyz-remote
  122. Host mail.chrishayward.xyz
  123. User chris@chrishayward.xyz
  124. PassCmd "pass chrishayward.xyz/chris"
  125. SSLType IMAPS
  126. MaildirStore xyz-local
  127. Path ~/.cache/mail/
  128. Inbox ~/.cache/mail/inbox
  129. SubFolders Verbatim
  130. Channel xyz
  131. Far :xyz-remote:
  132. Near :xyz-local:
  133. Patterns * !Archives
  134. Create Both
  135. Expunge Both
  136. SyncState *
  137. '';
  138. };
  139. }