diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-05-15 15:27:19 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-05-15 15:27:19 +0200 |
commit | 1514c30e46768eb978996660ad46ca8e48cef5b7 (patch) | |
tree | c27da4992f00b4c7372020c367e8560d2355cfc7 /accounts/gkleen@sif/emacs.el | |
parent | 9dddbe15c421b9f62cddee6f8cc4147f9d40cd86 (diff) | |
download | nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.tar nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.tar.gz nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.tar.bz2 nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.tar.xz nixos-1514c30e46768eb978996660ad46ca8e48cef5b7.zip |
...
Diffstat (limited to 'accounts/gkleen@sif/emacs.el')
-rw-r--r-- | accounts/gkleen@sif/emacs.el | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/emacs.el b/accounts/gkleen@sif/emacs.el index c8356bf2..b22c00f5 100644 --- a/accounts/gkleen@sif/emacs.el +++ b/accounts/gkleen@sif/emacs.el | |||
@@ -68,7 +68,7 @@ | |||
68 | 68 | ||
69 | (setq undo-tree-auto-save-history t) | 69 | (setq undo-tree-auto-save-history t) |
70 | 70 | ||
71 | (defvar expand-file-name-custom-tilde-alist '()) | 71 | (defvar expand-file-name-custom-tilde-alist '(("u2w-dev1" . "/ssh:uni2work-dev1:/home/gkleen/projects/uni2work"))) |
72 | (defun my/add-to-tilde-alist (hash) | 72 | (defun my/add-to-tilde-alist (hash) |
73 | (let* ((tilde:dir (split-string hash "=")) | 73 | (let* ((tilde:dir (split-string hash "=")) |
74 | (tilde (car tilde:dir)) | 74 | (tilde (car tilde:dir)) |
@@ -128,6 +128,29 @@ | |||
128 | (setq ido-everywhere t) | 128 | (setq ido-everywhere t) |
129 | (ido-mode 1) | 129 | (ido-mode 1) |
130 | 130 | ||
131 | (setq tramp-default-method "ssh") | ||
132 | (customize-set-variable 'tramp-use-ssh-controlmaster-options nil) | ||
133 | |||
134 | (setq direnv-enabled-hosts '("uni2work-dev1")) | ||
135 | |||
136 | (defun tramp-sh-handle-start-file-process@my-direnv (args) | ||
137 | "Enable Direnv for hosts in `direnv-enabled-hosts'." | ||
138 | (with-parsed-tramp-file-name (expand-file-name default-directory) nil | ||
139 | (if (member host direnv-enabled-hosts) | ||
140 | (pcase-let ((`(,name ,buffer ,program . ,args) args)) | ||
141 | `(,name | ||
142 | ,buffer | ||
143 | "direnv" | ||
144 | "exec" | ||
145 | ,localname | ||
146 | ,program | ||
147 | ,@args)) | ||
148 | args))) | ||
149 | |||
150 | (with-eval-after-load "tramp-sh" | ||
151 | (advice-add 'tramp-sh-handle-start-file-process | ||
152 | :filter-args #'tramp-sh-handle-start-file-process@my-direnv)) | ||
153 | |||
131 | (setq mail-host-address "sif.midgard.yggdrasil") | 154 | (setq mail-host-address "sif.midgard.yggdrasil") |
132 | (setq user-full-name "Gregor Kleen") | 155 | (setq user-full-name "Gregor Kleen") |
133 | 156 | ||