about summary refs log tree commit diff
path: root/users/sterni/emacs/default.nix
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2021-08-19T14·19+0200
committersterni <sternenseemann@systemli.org>2021-08-24T12·13+0000
commit58b9a53d5c0d7ccf050d55795bb3261f477acdf1 (patch)
treea6a448d08361cac81cbe2c89bcc40bd3d0362856 /users/sterni/emacs/default.nix
parent559ee9467bbbba0794891edee7aa5fcd2c4cbccc (diff)
feat(users/sterni): add emacs configuration r/2755
Change-Id: Icbdb52ba5ea51e8594eb46c5f0740e4f7c353be4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3381
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/sterni/emacs/default.nix')
-rw-r--r--users/sterni/emacs/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/users/sterni/emacs/default.nix b/users/sterni/emacs/default.nix
new file mode 100644
index 000000000000..63a0fc19c150
--- /dev/null
+++ b/users/sterni/emacs/default.nix
@@ -0,0 +1,40 @@
+{ depot, pkgs, ... }:
+
+let
+  inherit (pkgs.emacsGcc.pkgs) withPackages;
+
+  emacs = withPackages (epkgs: [
+    # basic setup
+    epkgs.elpaPackages.undo-tree
+    epkgs.melpaPackages.evil
+    epkgs.melpaPackages.evil-collection
+    epkgs.melpaPackages.use-package
+    # languages
+    epkgs.elpaPackages.ada-mode
+    epkgs.melpaPackages.adoc-mode
+    epkgs.melpaPackages.dockerfile-mode
+    epkgs.melpaPackages.haskell-mode
+    epkgs.melpaPackages.markdown-mode
+    epkgs.melpaPackages.nix-mode
+    epkgs.melpaPackages.sly
+    epkgs.melpaPackages.yaml-mode
+    epkgs.urweb-mode
+    # misc
+    epkgs.melpaPackages.hl-todo
+    epkgs.elpaPackages.rainbow-mode
+    epkgs.melpaPackages.rainbow-delimiters
+    # beyond text editing
+    epkgs.melpaPackages.elfeed
+    epkgs.melpaPackages.magit
+    epkgs.tvlPackages.tvl
+  ]);
+in
+
+# sadly we can't give an init-file via the command line
+pkgs.writeShellScriptBin "emacs" ''
+  exec ${emacs}/bin/emacs     \
+    --no-init-file            \
+    --directory ${./.}        \
+    --eval "(require 'init)" \
+    "$@"
+''