From 2a79b770054d1cd4699cdaaae8eab83a8ca92006 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Tue, 29 Aug 2023 12:15:22 +0530 Subject: repo: update the project structure --- modules/kaysshfs.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 modules/kaysshfs.nix (limited to 'modules/kaysshfs.nix') diff --git a/modules/kaysshfs.nix b/modules/kaysshfs.nix new file mode 100644 index 0000000..c526927 --- /dev/null +++ b/modules/kaysshfs.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +{ + system.fsPackages = with pkgs; [ sshfs ]; + + fileSystems."/mnt/kay" = { + device = "sinansftp@sinanmohd.com:"; + fsType = "sshfs"; + options = [ + "allow_other" # for non-root access + "_netdev" # this is a network fs + "x-systemd.automount" # mount on demand + + # SSH options + "reconnect" # handle connection drops + "ServerAliveInterval=15" # keep connections alive + "IdentityFile=/var/secrets/kaysftp-key" + ]; + }; +} -- cgit v1.2.3