summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
authorAlan Pearce2020-09-10 19:31:08 +0200
committerAlan Pearce2020-09-10 19:31:08 +0200
commit9f310ba57bcc49a25a8d1b3578859ea6bff6543a (patch)
tree57727a0b08a585ce8782112b89030e6475842741 /user/emacs
parente1b1c2085c622be7e79c68863e48c1241e6221d3 (diff)
downloadnixfiles-9f310ba57bcc49a25a8d1b3578859ea6bff6543a.tar.lz
nixfiles-9f310ba57bcc49a25a8d1b3578859ea6bff6543a.tar.zst
nixfiles-9f310ba57bcc49a25a8d1b3578859ea6bff6543a.zip
Emacs: enable editing of root-owned remote files
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/init.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 6d4203e5..632af5cb 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -576,6 +576,17 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package goto-chg
   :defer 1)
 
+
+;;;; TRAMP
+
+(use-package tramp
+  :defer t
+  :config (progn
+            (add-to-list 'tramp-default-proxies-alist
+                         '(nil "\\`root\\'" "/ssh:%h:"))
+            (add-to-list 'tramp-default-proxies-alist
+                         '((regexp-quote (system-name)) nil nil))))
+
 ;;; Directories
 
 (setq dired-dwim-target t