anchor.diff:              bindsTo = databaseServices;
               wantedBy = [ "multi-user.target" ];
               path = with pkgs; [
  +              cfg.package
  +              openssl
                 replace-secret
               ];
               environment = {
  
positive.code: 
          mkdir -p {deployments,ssl}
  
          "${cfg.package}/bin/standalone.sh"&
  
          attempt=1
          max_attempts=30
          while ! ${cfg.package}/bin/jboss-cli.sh --connect ':read-attribute(name=server-state)'; do
              if [[ "$attempt" == "$max_attempts" ]]; then
                  echo "ERROR: Could not connect to Keycloak after $attempt attempts! Failing.." >&2
                  exit 1
  
negative.code:             ( echo "CREATE USER IF NOT EXISTS 'keycloak'@'localhost' IDENTIFIED BY '$db_password';"
                echo "CREATE DATABASE keycloak CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
                echo "GRANT ALL PRIVILEGES ON keycloak.* TO 'keycloak'@'localhost';"
              ) | mysql -N
            '';
          };
  
  