2025-06-26 21:20:09 -05:00
|
|
|
{ moduleFunctions }:
|
2025-03-29 23:08:26 -05:00
|
|
|
let
|
2025-06-26 21:20:09 -05:00
|
|
|
inherit (moduleFunctions.devicesFunctions)
|
2025-06-25 18:28:16 -05:00
|
|
|
sshfsOptions
|
2025-03-29 23:08:26 -05:00
|
|
|
fileModeAndDirMode
|
2025-06-25 18:28:16 -05:00
|
|
|
ceresStorageDriveName
|
2025-03-29 23:08:26 -05:00
|
|
|
ownerExclusiveReadWriteMask
|
|
|
|
readWritePermissions
|
|
|
|
sambaPermissions
|
|
|
|
userIdForUser0
|
|
|
|
ceresIP
|
|
|
|
;
|
2025-06-26 21:20:09 -05:00
|
|
|
inherit (moduleFunctions.usersFunctions) user0;
|
|
|
|
inherit (moduleFunctions.devicesFunctions) externalIP;
|
|
|
|
|
2025-03-29 23:08:26 -05:00
|
|
|
ceresName = "ceres";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
label = "Ceres";
|
|
|
|
name = ceresName;
|
|
|
|
sync = {
|
|
|
|
address0 = "";
|
|
|
|
};
|
|
|
|
ip = {
|
|
|
|
address0 = ceresIP;
|
|
|
|
};
|
|
|
|
boot = {
|
|
|
|
options = ownerExclusiveReadWriteMask;
|
|
|
|
};
|
2025-07-01 04:11:32 -05:00
|
|
|
wireguard = {
|
2025-07-01 16:08:54 -05:00
|
|
|
ip0 = "10.100.0.1";
|
2025-07-01 04:11:32 -05:00
|
|
|
};
|
2025-03-29 23:08:26 -05:00
|
|
|
storage0 = {
|
|
|
|
mount = "/mnt/media/${ceresStorageDriveName}";
|
|
|
|
device = "/dev/disk/by-label/${ceresStorageDriveName}";
|
|
|
|
options = readWritePermissions;
|
|
|
|
};
|
|
|
|
samba0 = {
|
|
|
|
mount = "/mnt/media/${ceresName}";
|
|
|
|
device = "//${ceresIP}";
|
|
|
|
options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
|
|
|
|
};
|
2025-06-25 18:28:16 -05:00
|
|
|
remote0 = {
|
|
|
|
mount = "/mnt/media/remote";
|
2025-06-26 21:20:09 -05:00
|
|
|
device = "${user0}@${externalIP}:/mnt/media/${ceresStorageDriveName}";
|
2025-06-25 18:28:16 -05:00
|
|
|
options = sshfsOptions;
|
|
|
|
};
|
2025-03-29 23:08:26 -05:00
|
|
|
}
|