diff --git a/ansible/inventory/group_vars/desktop.yml b/ansible/inventory/group_vars/desktop.yml index 5d93cb6..16afc33 100644 --- a/ansible/inventory/group_vars/desktop.yml +++ b/ansible/inventory/group_vars/desktop.yml @@ -234,6 +234,10 @@ desktop_common_dotfiles: src: .local/bin/udiskie-password dest: .local/bin/udiskie-password mode: "0755" + - name: SSH config + src: .ssh/config + dest: .ssh/config + mode: "0600" desktop_i3_dotfiles: - name: i3 config diff --git a/ansible/roles/dotfiles_common/tasks/main.yml b/ansible/roles/dotfiles_common/tasks/main.yml index 2a337eb..d8e90a8 100644 --- a/ansible/roles/dotfiles_common/tasks/main.yml +++ b/ansible/roles/dotfiles_common/tasks/main.yml @@ -16,6 +16,15 @@ loop: "{{ xdg_user_directories | default([]) }}" when: "'void' in group_names" +- name: Ensure SSH socket directory exists + tags: [dotfiles, dotfiles:common] + ansible.builtin.file: + path: "{{ effective_user_home }}/.local/state/ssh/sockets" + state: directory + owner: "{{ effective_username }}" + group: "{{ effective_user_group }}" + mode: "0700" + - name: Copy common dotfiles tags: [dotfiles, dotfiles:common] ansible.builtin.copy: diff --git a/dotfiles/desktop/.emacs.d/init.el b/dotfiles/desktop/.emacs.d/init.el index f870454..ba4b1b7 100644 --- a/dotfiles/desktop/.emacs.d/init.el +++ b/dotfiles/desktop/.emacs.d/init.el @@ -19,6 +19,7 @@ 'tools/dired 'tools/project 'tools/spell + 'tools/tramp 'tools/lsp 'tools/dap 'tools/treesitter diff --git a/dotfiles/desktop/.emacs.d/lisp/tools/tramp.el b/dotfiles/desktop/.emacs.d/lisp/tools/tramp.el new file mode 100644 index 0000000..e001dfd --- /dev/null +++ b/dotfiles/desktop/.emacs.d/lisp/tools/tramp.el @@ -0,0 +1,13 @@ +;;; tramp.el -*- lexical-binding: t; -*- + +(use-package tramp + :config + (setq tramp-use-ssh-controlmaster-options t) + (setq tramp-chunksize 500) + (setq tramp-verbose 0) + (setq tramp-gvfs-wget "wget --quiet") + (setq tramp-cache-read-persistent-cache t)) + +(provide 'tools/tramp) + +;;; tramp.el ends here diff --git a/dotfiles/desktop/.ssh/config b/dotfiles/desktop/.ssh/config new file mode 100644 index 0000000..67aed87 --- /dev/null +++ b/dotfiles/desktop/.ssh/config @@ -0,0 +1,7 @@ +Host * + ControlMaster auto + ControlPath ~/.local/state/ssh/sockets/%r@%h-%p + ControlPersist 600 + Compression yes + ServerAliveInterval 60 + ServerAliveCountMax 3