anchor.diff:        type = types.str;
         default = "/var/lib/nextcloud";
         description = "Storage path of nextcloud.";
  +    };
  +    datadir = mkOption {
  +      type = types.nullOr types.str;
  +      default = null;
  +      description = ''
  +        Data storage path of nextcloud.  Will be <xref linkend="opt-services.nextcloud.home" /> by default.
  +        This folder will be populated with a config.php and data folder which contains the state of the instance (excl the database).";
  +      '';
  +      example = "/mnt/nextcloud-file";
       };
       logLevel = mkOption {
         type = types.ints.between 0 4;
  
positive.code: let
    cfg = config.services.nextcloud;
    fpm = config.services.phpfpm.pools.nextcloud;
  
    phpPackage = cfg.phpPackage.buildEnv {
      extensions = { enabled, all }:
  
negative.code:               "--database-pass" = "\$${dbpass.arg}";
                "--admin-user" = ''"${c.adminuser}"'';
                "--admin-pass" = "\$${adminpass.arg}";
                "--data-dir" = ''"${datadir}/data"'';
              });
            in ''
              ${mkExport dbpass}
  