anchor.diff:        after = [ "network.target" "local-fs.target" "keys.target" ];
         wants = [ "keys.target" ];
         wantedBy = [ "multi-user.target" ];
  -      path = with pkgs; [ mysql ];
         preStart = configureFiles;
         serviceConfig = {
  -        ExecStart = configureDB;
  +        ExecStart = configureDB.${cfg.resources.icingaweb2db.type};
           PermissionsStartOnly = true;
           RemainAfterExit = true;
           User = "icingaweb2";
  
positive.code:     host     = mandatory str;
      passfile = optional path;
      port     = optional int;
      type     = mandatory (enum [ "mysql" ]);
      user     = mandatory str;
    };
  
  
negative.code:   '';
  
    mkResource = name: opts:
      ''
        cat <<'__EOF__'
  
        [${name}]
        type = "db"
        db = "${opts.type}"
        dbname = "${opts.db}"
        host = "${opts.host}"
        port = "${show opts.port}"
        username = "${opts.user}"
        __EOF__
        ${optionalString (opts.passfile != null) ''
          pwd=$(cat '${opts.passfile}')
          printf 'password="%s"\n' "$pwd"
        ''}
      '';
  
    genResourcesIni = pkgs.writeBashScript "resources" (concatStringsSep "\n" (
      mapAttrsToList mkResource (explicit cfg.resources)
  