From 3dd2a09087192f6c721bb851276a0019c839eded Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 29 Apr 2025 10:22:16 -0700 Subject: initial import of emacs config --- nix/users/fcuny/emacs.nix | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 nix/users/fcuny/emacs.nix (limited to 'nix/users/fcuny/emacs.nix') diff --git a/nix/users/fcuny/emacs.nix b/nix/users/fcuny/emacs.nix new file mode 100644 index 0000000..9c3b73b --- /dev/null +++ b/nix/users/fcuny/emacs.nix @@ -0,0 +1,69 @@ +{ pkgs, ... }: +let + myEmacs = pkgs.emacsWithPackagesFromUsePackage { + # TODO: https://github.com/NixOS/nixpkgs/issues/395169 + package = pkgs.emacs.override { withNativeCompilation = false; }; + config = ./configs/emacs/init.el; + defaultInitFile = true; + extraEmacsPackages = + epkgs: with epkgs; [ + # completion + cape + consult + corfu + marginalia + orderless + vertico + + # development + dape + git-link + direnv + docker + docker-compose-mode + dockerfile-mode + go-mode + gotest + hcl-mode + jq-mode + json-mode + json-reformat + magit + nix-mode + protobuf-mode + terraform-mode + toml-mode + tree-sitter + tree-sitter-langs + treesit-grammars.with-all-grammars + yaml-mode + + # misc + ef-themes + exec-path-from-shell + rg + yasnippet + yasnippet-capf + ]; + }; +in +{ + home.file.".config/emacs/early-init.el".source = ./configs/emacs/early-init.el; + home.file.".config/emacs/init.el".source = ./configs/emacs/init.el; + + programs.emacs = { + enable = true; + package = myEmacs; + }; + + home.packages = with pkgs; [ + aspell + aspellDicts.en + aspellDicts.en-science + aspellDicts.en-computers + ]; + + home.sessionVariables = { + EDITOR = "emacsclient -t"; + }; +} -- cgit v1.2.3