Skip to content

Commit

Permalink
chore: refactor home directory mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
kmein committed Apr 12, 2024
1 parent 22b172a commit d6a3dee
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions configs/fu-berlin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,31 +92,24 @@ in {
"x-systemd.device-timeout=1"
"x-systemd.idle-timeout=1min"
];
in {
"${remoteDir}/fu/meinhak99/home" = {
device = "[email protected]:/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 = "[email protected]:/home/x/xm7234fu";
fsType = "sshfs";
options = [
"allow_other"
"_netdev"
"x-systemd.automount"
"reconnect"
"ServerAliveInterval=15"
"IdentityFile=${config.age.secrets.fu-sftp-key.path}"
];

firstCharacter = lib.strings.substring 0 1;

home-directory-mount = user: {
"${remoteDir}/fu/${user}/home" = {
device = "${user}@login.zedat.fu-berlin.de:/home/${firstCharacter user}/${user}";
fsType = "sshfs";
options = [
"allow_other"
"_netdev"
"x-systemd.automount"
"reconnect"
"ServerAliveInterval=15"
"IdentityFile=${config.age.secrets.fu-sftp-key.path}"
];
};
};
in {
"${remoteDir}/fu/zodiac" = {
device = "//trove.storage.fu-berlin.de/GESCHKULT";
fsType = "cifs";
Expand All @@ -126,7 +119,8 @@ in {
"credentials=${config.age.secrets.cifs-credentials-zodiac.path}"
];
};
};
} // home-directory-mount "meinhak99"
// home-directory-mount "xm7234fu";

age.secrets = {
cifs-credentials-zodiac.file = ../secrets/cifs-credentials-zodiac.age;
Expand Down

0 comments on commit d6a3dee

Please sign in to comment.