nur/modules/web-apps/wordpress/wp-config.nix
2021-11-22 21:55:12 +01:00

25 lines
575 B
Nix

{ dbConfig
, secrets
, debugMode ? false
, extraConfig
, ...
}:
''
<?php
${secrets}
define('DB_NAME', '${dbConfig.name}');
define('DB_USER', '${dbConfig.user}');
define('DB_PASSWORD', '${dbConfig.password}');
define('DB_HOST', '${dbConfig.host}');
define('DB_CHARSET', '${dbConfig.charset}');
$table_prefix = '${dbConfig.tablePrefix}';
${extraConfig}
define('WP_DEBUG', ${if debugMode then "true" else "false"});
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
require_once(ABSPATH . 'wp-settings.php');
''