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.

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