mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-09 05:14:41 -05:00
48 lines
1.1 KiB
Nix
Executable file
48 lines
1.1 KiB
Nix
Executable file
{ moduleFunctions }:
|
|
let
|
|
inherit (moduleFunctions.devicesFunctions)
|
|
sshfsOptions
|
|
fileModeAndDirMode
|
|
ceresStorageDriveName
|
|
ownerExclusiveReadWriteMask
|
|
readWritePermissions
|
|
sambaPermissions
|
|
userIdForUser0
|
|
ceresIP
|
|
;
|
|
inherit (moduleFunctions.usersFunctions) user0;
|
|
inherit (moduleFunctions.devicesFunctions) externalIP;
|
|
|
|
ceresName = "ceres";
|
|
in
|
|
{
|
|
label = "Ceres";
|
|
name = ceresName;
|
|
sync = {
|
|
address0 = "";
|
|
};
|
|
ip = {
|
|
address0 = ceresIP;
|
|
};
|
|
boot = {
|
|
options = ownerExclusiveReadWriteMask;
|
|
};
|
|
wireguard = {
|
|
ip0 = "10.100.0.1";
|
|
};
|
|
storage0 = {
|
|
mount = "/mnt/media/${ceresStorageDriveName}";
|
|
device = "/dev/disk/by-label/${ceresStorageDriveName}";
|
|
options = readWritePermissions;
|
|
};
|
|
samba0 = {
|
|
mount = "/mnt/media/${ceresName}";
|
|
device = "//${ceresIP}";
|
|
options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
|
|
};
|
|
remote0 = {
|
|
mount = "/mnt/media/remote";
|
|
device = "${user0}@${externalIP}:/mnt/media/${ceresStorageDriveName}";
|
|
options = sshfsOptions;
|
|
};
|
|
}
|