aboutsummaryrefslogtreecommitdiff
path: root/nix/users/fcuny/emacs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/users/fcuny/emacs.nix')
-rw-r--r--nix/users/fcuny/emacs.nix69
1 files changed, 69 insertions, 0 deletions
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";
+ };
+}