anchor.diff:              ${occSetTrustedDomainsCmd}
             '';
             serviceConfig.Type = "oneshot";
  +          serviceConfig.User = "nextcloud";
           };
           nextcloud-cron = {
             environment.NEXTCLOUD_CONFIG_DIR = "${cfg.home}/config";
             serviceConfig.Type = "oneshot";
  -          serviceConfig.User = cfg.user;
  +          serviceConfig.User = "nextcloud";
             serviceConfig.ExecStart = "${phpPackage}/bin/php -f ${cfg.package}/cron.php";
           };
           nextcloud-update-plugins = mkIf cfg.autoUpdateApps.enable {
             serviceConfig.Type = "oneshot";
             serviceConfig.ExecStart = "${occ}/bin/nextcloud-occ app:update --all";
  -          serviceConfig.User = cfg.user;
  +          serviceConfig.User = "nextcloud";
             startAt = cfg.autoUpdateApps.startAt;
           };
         };
   
         services.phpfpm = {
           pools.nextcloud = {
  -          user = cfg.user;
  -          inherit group;
  +          user = "nextcloud";
  +          group = "nextcloud";
             phpOptions = phpOptionsStr;
             phpPackage = phpPackage;
             phpEnv = {
  
positive.code:       };
        dbuser = mkOption {
          type = types.nullOr types.str;
          default = cfg.user;
          description = "Database user.";
        };
        dbpass = mkOption {
  
negative.code:             PATH = "/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin";
            };
            settings = mapAttrs (name: mkDefault) {
              "listen.owner" = serverUser;
              "listen.group" = config.users.users.${serverUser}.group;
            } // cfg.poolSettings;
            extraConfig = cfg.poolConfig;
          };
        };
  
        users.users.nextcloud = {
          home = "${cfg.home}";
          group = "nextcloud";
          createHome = true;
        };
        users.groups.nextcloud.members = [ "nextcloud" "${serverUser}" ];
  
        environment.systemPackages = [ occ ];
      }
  