diff options
| author | Franck Cuny <franck@fcuny.net> | 2025-07-21 07:31:45 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2025-07-21 08:13:11 -0700 |
| commit | 23f8df7396d35744069a4bda0d1d38a55ff64b79 (patch) | |
| tree | 772b5e72355e9ee5b3ae31aef37fe1d4508e8f30 /nix/users/profiles/emacs.nix | |
| parent | add docker helpers and clean up some dependencies (diff) | |
| download | infra-23f8df7396d35744069a4bda0d1d38a55ff64b79.tar.gz | |
refactoring to use flake-parts and automatic imports of hosts
This is the first step in a large refactoring to use flake-parts, and to
automatically imports hosts based on paths.
Diffstat (limited to 'nix/users/profiles/emacs.nix')
| -rw-r--r-- | nix/users/profiles/emacs.nix | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/nix/users/profiles/emacs.nix b/nix/users/profiles/emacs.nix new file mode 100644 index 0000000..fcf1b8f --- /dev/null +++ b/nix/users/profiles/emacs.nix @@ -0,0 +1,89 @@ +{ + configPath, + pkgs, + lib, + ... +}: +let + packages = + epkgs: with epkgs; [ + aidermacs # pair programming in Emacs with Aider + cape + consult + consult-denote + corfu + denote + denote-journal + denote-markdown + denote-org + denote-silo + denote-sequence + diminish + direnv + docker + docker-compose-mode + dockerfile-mode + exec-path-from-shell + git-link + go-mode + gotest + gptel # LLM client for Emacs + hcl-mode + jq-mode + json-mode + json-reformat + magit + marginalia + markdown-mode + nix-mode + orderless + protobuf-mode + rg + terraform-mode + toml-mode + tree-sitter + tree-sitter-langs + treesit-grammars.with-all-grammars + vertico + yaml-mode + yasnippet + yasnippet-capf + ]; + emacsFiles = [ + "early-init.el" + "init.el" + "site-lisp/init-base.el" + "site-lisp/init-completion.el" + "site-lisp/init-llm.el" + "site-lisp/init-programming.el" + "site-lisp/init-text.el" + "site-lisp/init-ui.el" + ]; + mkEmacsFile = file: { + ".config/emacs/${file}" = { + source = "${configPath}/emacs/${file}"; + }; + }; +in +{ + home.file = lib.mkMerge (map mkEmacsFile emacsFiles); + + programs.emacs = { + enable = true; + extraPackages = packages; + # FIXME: https://github.com/NixOS/nixpkgs/issues/395169 + package = pkgs.emacs.override { withNativeCompilation = false; }; + }; + + home.packages = with pkgs; [ + aspell + aspellDicts.en + aspellDicts.en-science + aspellDicts.en-computers + ]; + + home.sessionVariables = { + EDITOR = "${pkgs.emacs}/bin/emacsclient -a="; + ASPELL_CONF = "dict-dir ${pkgs.aspellDicts.en}/lib/aspell"; + }; +} |
