modules(wp): add wp-config.nix
This commit is contained in:
parent
4cad87b8a9
commit
86b6f7eb31
1 changed files with 25 additions and 0 deletions
25
modules/web-apps/wordpress/wp-config.nix
Normal file
25
modules/web-apps/wordpress/wp-config.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ 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');
|
||||
''
|
Loading…
Add table
Reference in a new issue