summaryrefslogtreecommitdiff
path: root/modules/kaysshfs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/kaysshfs.nix')
-rw-r--r--modules/kaysshfs.nix20
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"
+ ];
+ };
+}