anchor.diff:      else cfg.database.port;
   
     poolName = "tt-rss";
  +
  +  mysqlLocal = cfg.database.createLocally && cfg.database.type == "mysql";
  +  pgsqlLocal = cfg.database.createLocally && cfg.database.type == "pgsql";
   
     tt-rss-config = pkgs.writeText "config.php" ''
       <?php
  
positive.code:             The database's port. If not set, the default ports will be provided (5432
              and 3306 for pgsql and mysql respectively).
            '';
          };
        };
  
  
negative.code: 
          serviceConfig = {
            User = "${cfg.user}";
            Group = "tt_rss";
            ExecStart = "${pkgs.php}/bin/php ${cfg.root}/update.php --daemon";
            StandardOutput = "syslog";
            StandardError = "syslog";
          };
  
          wantedBy = [ "multi-user.target" ];
          requires = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service";
          after = [ "network.target" ] ++ optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service";
      };
  
      services.mysql = mkIf mysqlLocal {
        enable = true;
        package = mkDefault pkgs.mysql;
        ensureDatabases = [ cfg.database.name ];
  