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.

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