anchor.diff:      # we should use systemd dependencies here
       #waitForUnit("network-interfaces.target");
       if [ ! -d ${serverInfo.fullConfig.services.mysql.dataDir}/${config.dbName} ]; then
  +      echo "Need to create the database '${config.dbName}' and grant permissions to user named '${config.dbUser}'."
         # Wait until MySQL is up
         while [ ! -e /var/run/mysql/mysqld.pid ]; do
           sleep 1
         done
         ${pkgs.mysql}/bin/mysql -e 'CREATE DATABASE ${config.dbName};'
         ${pkgs.mysql}/bin/mysql -e 'GRANT ALL ON ${config.dbName}.* TO ${config.dbUser}@localhost IDENTIFIED BY "${config.dbPassword}";'
  +    else 
  +      echo "Good, no need to do anything database related."
       fi
     '';
   }
  
positive.code: { config, lib, pkgs, serverInfo, php, ... }:
  
  with lib;
  
  let
    # https://wordpress.org/plugins/postgresql-for-wordpress/
    # Wordpress plugin 'postgresql-for-wordpress' installation example
    postgresqlForWordpressPlugin = pkgs.stdenv.mkDerivation {
      name = "postgresql-for-wordpress-plugin";
      # Download the theme from the wordpress site
      src = pkgs.fetchurl {
        url = https://downloads.wordpress.org/plugin/postgresql-for-wordpress.1.3.1.zip;
        sha256 = "f11a5d76af884c7bec2bc653ed5bd29d3ede9a8657bd67ab7824e329e5d809e8";
      };
      # We need unzip to build this package
      buildInputs = [ pkgs.unzip ];
      # Installing simply means copying all files to the output directory
      installPhase = "mkdir -p $out; cp -R * $out/";
    };
  
    # Our bare-bones wp-config.php file using the above settings
    wordpressConfig = pkgs.writeText "wp-config.php" ''
  
negative.code:       type = types.listOf types.path;
        description =
          ''
            List of path(s) to respective plugin(s) which are symlinked from the 'plugins' directory. Note: These plugins need to be packaged before use, see example.
          '';
        example = ''
          # Wordpress plugin 'akismet' installation example
  