all repos — nixfiles @ 9f310ba57bcc49a25a8d1b3578859ea6bff6543a

System and user configuration, managed by nix and home-manager

Emacs: enable editing of root-owned remote files
Alan Pearce alan@alanpearce.eu
Thu, 10 Sep 2020 19:31:08 +0200
commit

9f310ba57bcc49a25a8d1b3578859ea6bff6543a

parent

e1b1c2085c622be7e79c68863e48c1241e6221d3

1 files changed, 11 insertions(+), 0 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -576,6 +576,17 @@ (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