{ moduleFunctions }:
let
  inherit (moduleFunctions.devicesFunctions)
    fileModeAndDirMode
    ownerExclusiveReadWriteMask
    readWritePermissions
    erisStorageDriveName
    sambaPermissions
    userIdForUser0
    erisIP
    deviceNames
    ;

  erisName = deviceNames.eris;
in
{
  label = deviceNames.serverLabel;
  name = erisName;
  sync = {
    address0 = "";
  };
  ip = {
    address0 = erisIP;
  };
  boot = {
    options = ownerExclusiveReadWriteMask;
  };
  storage0 = {
    mount = "/mnt/media/${erisStorageDriveName}";
    device = "/dev/disk/by-label/${erisStorageDriveName}";
    options = readWritePermissions;
  };
  samba0 = {
    mount = "/mnt/media/${erisName}";
    device = "//${erisIP}";
    options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
  };
}
