nur/modules/web-apps/wordpress/wp-config.nix

26 lines
575 B
Nix
Raw Normal View History

2021-11-22 21:55:12 +01:00
{ 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');
''