/ modules / home / programs / emacs / default.nix
default.nix
  1  {
  2    lib,
  3    pkgs,
  4    flake,
  5    config,
  6    ...
  7  }:
  8  {
  9    imports = [
 10      flake.inputs.nix-doom-emacs-unstraightened.homeModule
 11    ];
 12  
 13    programs.doom-emacs = {
 14      enable = true;
 15      doomDir = ./.;
 16      # provideEmacs = false;
 17      experimentalFetchTree = config.targets.genericLinux.enable;
 18  
 19      extraPackages =
 20        epkgs:
 21        let
 22          treesitWithAllExceptQuint = epkgs.treesit-grammars.with-grammars (
 23            grammars:
 24            builtins.attrValues (
 25              builtins.removeAttrs grammars [
 26                "tree-sitter-quint"
 27              ]
 28            )
 29          );
 30        in
 31        with epkgs;
 32        [
 33          dts-mode
 34          # devicetree-ts-mode
 35          abc-mode
 36          kdl-mode
 37          scad-mode
 38          sqlup-mode
 39          kconfig-ref
 40          kconfig-mode
 41          mermaid-mode # github.com/abrochard/mermaid-mode
 42          lsp-tailwindcss
 43          treesitWithAllExceptQuint
 44        ]
 45        ++ [
 46          nov
 47          mu4e
 48          mu4e-views
 49          mu4e-column-faces
 50          mu4e-marker-icons
 51        ]
 52        ++ [
 53          osm
 54          empv
 55          verb
 56          # gptel
 57          vterm
 58          circe
 59          corfu
 60          prodigy
 61          pdf-tools
 62          magit-todos
 63          magit-delta
 64          claude-code
 65          corfu-terminal
 66          nerd-icons-corfu
 67        ]
 68        ++ [
 69          devdocs
 70          devdocs-browser
 71          compiler-explorer
 72        ]
 73        ++ [
 74          multi-vterm
 75          compile-multi
 76          fancy-compilation
 77          compile-multi-embark
 78          consult-compile-multi
 79        ]
 80        ++ [
 81          org-anki
 82          ob-mermaid
 83          org-roam-ui
 84          org-pdftools
 85          org-nix-shell
 86          org-auto-tangle
 87          org-super-agenda
 88          org-tag-beautify
 89          org-link-beautify
 90          org-table-highlight
 91        ]
 92        ++ [
 93          wttrin
 94          shrface
 95          keycast
 96          leetcode
 97          exercism
 98          nix-update
 99          nixos-options
100          all-the-icons
101        ]
102        ++ [
103          parrot
104          pacmacs
105          key-quiz
106          nyan-mode
107          fireplace
108          fretboard
109          speed-type
110          chordpro-mode
111          # treesit-grammars.with-all-grammars
112          # ================
113          # ================
114          # ================
115          # jira
116          # obsidian
117          # catppuccin-theme
118        ]
119        ++ lib.optionals pkgs.stdenv.isDarwin [
120          consult-spotlight
121        ];
122  
123      extraBinPackages =
124        with pkgs;
125        [
126          nil
127          nixfmt
128          ispell
129        ]
130        ++ [
131          buf # protobuf lsp
132          protobuf
133          protoc-gen-go
134          protoc-gen-go-grpc
135  
136        ]
137        ++ [
138          jq-lsp
139          graphql-language-service-cli
140        ]
141        ++ [
142          # ===== 🛠 ASSEMBLY 🛠 ======
143          asmfmt
144        ]
145        ++ [
146          # ===== đŸĻĢ GO đŸĻĢ ======
147          gore
148          gotests
149          gomodifytags
150          gocode-gomod
151          golangci-lint
152        ]
153        ++ [
154          # ==== 🚂 RUBY 🚂 =====
155          ruby-lsp
156        ]
157        ++ [
158          graphviz
159          plantuml
160          octaveFull # gnu octave
161          mermaid-cli # mermaid diagram support
162        ]
163        ++ [
164          fd
165          git
166          tuntox # collab
167          gnutls # :app irc
168          # semgrep
169        ]
170        ++ [
171          # eslint
172          # proselint
173          rustywind
174          # markdownlint-cli
175          # mdx-language-server
176        ]
177        ++ [
178          lldb
179          taplo # toml lsp
180          # emmet-ls
181          # yaml-language-server
182          # dockerfile-language-server
183          # vscode-langservers-extracted
184          vscode-extensions.llvm-vs-code-extensions.lldb-dap
185        ]
186        ++ [
187          # ==== đŸ’ŋ SQL đŸ’ŋ =====
188          postgres-language-server
189        ]
190        ++ lib.optionals (pkgs.stdenv.isLinux && pkgs.stdenv.isx86_64) [
191          bashdb
192        ];
193    };
194  
195    services.emacs = {
196      enable = true;
197      defaultEditor = false;
198      # socketActivation.enable = true;
199  
200      # extraOptions = [
201      #   "TERM=xterm-kitty"
202      # ];
203  
204      # client = {
205      #   enable = true;
206      #   # arguments = [
207      #   #   "--tty"
208      #   # ];
209      # };
210    };
211  }