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.

147 lines
3.4 KiB

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