about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-11T17·33+0100
committerVincent Ambo <mail@tazj.in>2020-06-11T17·33+0100
commit524b621231bb2a2c89f717fb9c8b5ee38df52e62 (patch)
treea9a869cf8ff647bb6a779887d697cc935fb32341 /tools
parent820f591cbbf911f881d5735358cd448df3eef0a7 (diff)
feat(tools/emacs): Configurable depot path, defaulting to /depot r/894
Diffstat (limited to 'tools')
-rw-r--r--tools/emacs/config/functions.el2
-rw-r--r--tools/emacs/config/init.el7
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/emacs/config/functions.el b/tools/emacs/config/functions.el
index cc94cc287b..907dbe5e11 100644
--- a/tools/emacs/config/functions.el
+++ b/tools/emacs/config/functions.el
@@ -43,7 +43,7 @@
 ;; Open my monorepo in magit
 (defun depot-status ()
   (interactive)
-  (magit-status "/depot"))
+  (magit-status depot-path))
 
 ;; Get the nix store path for a given derivation.
 ;; If the derivation has not been built before, this will trigger a build.
diff --git a/tools/emacs/config/init.el b/tools/emacs/config/init.el
index 41ddc5b132..60d18115b9 100644
--- a/tools/emacs/config/init.el
+++ b/tools/emacs/config/init.el
@@ -247,6 +247,13 @@
 (use-package web-mode)
 (use-package yaml-mode)
 
+(defgroup tazjin nil
+  "Settings related to my configuration")
+
+(defcustom depot-path "/depot"
+  "Local path to the depot checkout"
+  :group 'tazjin)
+
 ;; Configuration changes in `customize` can not actually be persisted
 ;; to the customise file that Emacs is currently using (since it comes
 ;; from the Nix store).