about summary refs log tree commit diff
path: root/users/sterni/emacs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/sterni/emacs/default.nix')
-rw-r--r--users/sterni/emacs/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/users/sterni/emacs/default.nix b/users/sterni/emacs/default.nix
new file mode 100644
index 000000000000..f7bdf21a025e
--- /dev/null
+++ b/users/sterni/emacs/default.nix
@@ -0,0 +1,43 @@
+{ 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.bqn-mode
+    epkgs.elpaPackages.ada-mode
+    epkgs.melpaPackages.adoc-mode
+    epkgs.melpaPackages.dockerfile-mode
+    epkgs.melpaPackages.haskell-mode
+    epkgs.melpaPackages.jq-mode
+    epkgs.melpaPackages.markdown-mode
+    epkgs.melpaPackages.nix-mode
+    epkgs.melpaPackages.sly
+    epkgs.melpaPackages.yaml-mode
+    epkgs.rust-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)" \
+    "$@"
+''