diff options
author | sinanmohd <sinan@sinanmohd.com> | 2023-08-29 12:15:22 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2023-08-29 12:38:25 +0530 |
commit | 2a79b770054d1cd4699cdaaae8eab83a8ca92006 (patch) | |
tree | bc1cfef81c101e2882df643be876e5e023cbd764 /modules/kaysshfs.nix | |
parent | d0f36974931b425326ada13780e79666500c05a1 (diff) |
repo: update the project structure
Diffstat (limited to 'modules/kaysshfs.nix')
-rw-r--r-- | modules/kaysshfs.nix | 20 |
1 files changed, 20 insertions, 0 deletions
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" + ]; + }; +} |