From 9432fa62d86854b0cf847602f503d88fb396df51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Tue, 9 Apr 2024 19:41:24 +0200 Subject: [PATCH] feat(fu-berlin): mount home directories via sshfs --- configs/fu-berlin.nix | 34 +++++++++++++++++++++++++++++++++- secrets | 2 +- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/configs/fu-berlin.nix b/configs/fu-berlin.nix index fc28d5a..673ea9f 100644 --- a/configs/fu-berlin.nix +++ b/configs/fu-berlin.nix @@ -69,8 +69,16 @@ in { group = config.users.users.me.group; mode = "400"; }; + fu-sftp-key = { + file = ../secrets/fu-sftp-key.age; + owner = "root"; + group = "root"; + mode = "400"; + }; }; + system.fsPackages = [ pkgs.sshfs ]; + # https://www.zedat.fu-berlin.de/tip4u_157.pdf fileSystems = let fu-berlin-cifs-options = [ @@ -85,7 +93,31 @@ in { "x-systemd.idle-timeout=1min" ]; in { - "${remoteDir}/fu-berlin/zodiac" = { + "${remoteDir}/fu/meinhak99/home" = { + device = "meinhak99@login.zedat.fu-berlin.de:/home/m/meinhak99"; + fsType = "sshfs"; + options = [ + "allow_other" + "_netdev" + "x-systemd.automount" + "reconnect" + "ServerAliveInterval=15" + "IdentityFile=${config.age.secrets.fu-sftp-key.path}" + ]; + }; + "${remoteDir}/fu/xm7234fu/home" = { + device = "xm7234fu@login.zedat.fu-berlin.de:/home/x/xm7234fu"; + fsType = "sshfs"; + options = [ + "allow_other" + "_netdev" + "x-systemd.automount" + "reconnect" + "ServerAliveInterval=15" + "IdentityFile=${config.age.secrets.fu-sftp-key.path}" + ]; + }; + "${remoteDir}/fu/zodiac" = { device = "//trove.storage.fu-berlin.de/GESCHKULT"; fsType = "cifs"; options = diff --git a/secrets b/secrets index 5405c6e..ecdc95a 160000 --- a/secrets +++ b/secrets @@ -1 +1 @@ -Subproject commit 5405c6eb5fe0afa91121103621d01eb889738da8 +Subproject commit ecdc95abf8eb321d3a57341fc7da449614b31bad