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.

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