feat(emacs/tramp): add NixOS support for TRAMP connections
This commit is contained in:
parent
57a5be3183
commit
20ac94c9fb
@ -460,6 +460,7 @@ supported natively. I will describe them here.
|
|||||||
(use-package tramp
|
(use-package tramp
|
||||||
:straight (tramp :type built-in :build t)
|
:straight (tramp :type built-in :build t)
|
||||||
:config
|
:config
|
||||||
|
<<tramp-nixos>>
|
||||||
<<tramp-add-yadm>>
|
<<tramp-add-yadm>>
|
||||||
(setopt tramp-ssh-controlmaster-options nil
|
(setopt tramp-ssh-controlmaster-options nil
|
||||||
tramp-verbose 0
|
tramp-verbose 0
|
||||||
@ -469,6 +470,19 @@ supported natively. I will describe them here.
|
|||||||
(cons tramp-file-name-regexp nil)))
|
(cons tramp-file-name-regexp nil)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** SSHing into NixOS remotes
|
||||||
|
When using TRAMP to SSH into remote NixOS hosts, the true =$PATH= gets
|
||||||
|
truncated, rendering some binaries unavailable, such as =git= or =nil= (an
|
||||||
|
LSP server for the Nix language). To fix that, we simply need to write
|
||||||
|
the following code.
|
||||||
|
#+name: tramp-nixos
|
||||||
|
#+begin_src emacs-lisp :tangle no
|
||||||
|
(require 'tramp-sh)
|
||||||
|
(setq tramp-remote-path (append tramp-remote-path
|
||||||
|
'(tramp-own-remote-path)))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** Yadm
|
*** Yadm
|
||||||
[[https://yadm.io/][~yadm~]] is a git wrapper made to easily manage your dotfiles. It has
|
[[https://yadm.io/][~yadm~]] is a git wrapper made to easily manage your dotfiles. It has
|
||||||
loads of features I don’t use (the main one I like but don’t use is
|
loads of features I don’t use (the main one I like but don’t use is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user