From a18ec08be92d7c6bf443a6e0d5213882f81f4390 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Mon, 26 Feb 2024 00:16:51 +0300 Subject: [PATCH] Ssh : Add sshmount. --- .config/linux/system/module/common/Package.nix | 1 - .config/linux/system/module/common/Ssh.nix | 1 + .config/linux/system/module/common/bash/module/Ssh.sh | 7 +++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .config/linux/system/module/common/bash/module/Ssh.sh diff --git a/.config/linux/system/module/common/Package.nix b/.config/linux/system/module/common/Package.nix index 4947e5b..2cab1c5 100644 --- a/.config/linux/system/module/common/Package.nix +++ b/.config/linux/system/module/common/Package.nix @@ -29,7 +29,6 @@ scanmem smartmontools sqlite - sshfs steam-run testdisk tree diff --git a/.config/linux/system/module/common/Ssh.nix b/.config/linux/system/module/common/Ssh.nix index 444146c..e6b5656 100644 --- a/.config/linux/system/module/common/Ssh.nix +++ b/.config/linux/system/module/common/Ssh.nix @@ -1,4 +1,5 @@ { ... }: { + environment.systemPackages = with pkgs; [ sshfs ]; programs.ssh.extraConfig = '' Host dasha HostName 192.168.1.7 diff --git a/.config/linux/system/module/common/bash/module/Ssh.sh b/.config/linux/system/module/common/bash/module/Ssh.sh new file mode 100644 index 0000000..45ed712 --- /dev/null +++ b/.config/linux/system/module/common/bash/module/Ssh.sh @@ -0,0 +1,7 @@ +# Mount FS over ssh. Just extra config for sshfs. +# Usage: sshmount +function sshmount() { + sshfs -o uid=${UID},auto_unmount "${@}" +} + +complete -o nospace -F _sshfs sshmount