diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-18 23:03:33 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-18 23:03:33 +0100 |
commit | 62a0946e8b3eda220943b9740becb3c969455549 (patch) | |
tree | a4dd353e4a600535b82564fddba8af7a2e31f994 | |
parent | 21b095c7a2fc75e8ec991c963e9079071c7d8e28 (diff) | |
download | Nix-62a0946e8b3eda220943b9740becb3c969455549.tar.gz Nix-62a0946e8b3eda220943b9740becb3c969455549.tar.zst Nix-62a0946e8b3eda220943b9740becb3c969455549.zip |
Fix chloe dev website
-rw-r--r-- | virtual/modules/websites/chloe/chloe.nix | 2 | ||||
-rw-r--r-- | virtual/modules/websites/chloe/chloe_config_dev/chmod.php (renamed from virtual/modules/websites/chloe/chloe_config/chmod.php) | 0 | ||||
-rw-r--r-- | virtual/modules/websites/chloe/chloe_config_dev/connect.php (renamed from virtual/modules/websites/chloe/chloe_config/connect.php) | 0 | ||||
-rw-r--r-- | virtual/modules/websites/chloe/chloe_config_dev/ldap.php (renamed from virtual/modules/websites/chloe/chloe_config/ldap.php) | 0 | ||||
-rw-r--r-- | virtual/modules/websites/chloe/chloe_config_prod/chmod.php | 4 | ||||
-rw-r--r-- | virtual/modules/websites/chloe/chloe_config_prod/connect.php | 6 | ||||
-rw-r--r-- | virtual/modules/websites/chloe/chloe_config_prod/ldap.php | 9 | ||||
-rw-r--r-- | virtual/modules/websites/chloe/default.nix | 2 |
8 files changed, 21 insertions, 2 deletions
diff --git a/virtual/modules/websites/chloe/chloe.nix b/virtual/modules/websites/chloe/chloe.nix index 126d8e7..ca34b5a 100644 --- a/virtual/modules/websites/chloe/chloe.nix +++ b/virtual/modules/websites/chloe/chloe.nix | |||
@@ -96,7 +96,7 @@ let | |||
96 | install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions | 96 | install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions |
97 | ''; | 97 | ''; |
98 | }; | 98 | }; |
99 | configDir = ./chloe_config; | 99 | configDir = ./chloe_config_ + environment; |
100 | varDir = "/var/lib/chloe_${environment}"; | 100 | varDir = "/var/lib/chloe_${environment}"; |
101 | siteDir = stdenv.mkDerivation (fetchedGitPrivate ./chloe.json // rec { | 101 | siteDir = stdenv.mkDerivation (fetchedGitPrivate ./chloe.json // rec { |
102 | buildPhase = '' | 102 | buildPhase = '' |
diff --git a/virtual/modules/websites/chloe/chloe_config/chmod.php b/virtual/modules/websites/chloe/chloe_config_dev/chmod.php index aae16cd..aae16cd 100644 --- a/virtual/modules/websites/chloe/chloe_config/chmod.php +++ b/virtual/modules/websites/chloe/chloe_config_dev/chmod.php | |||
diff --git a/virtual/modules/websites/chloe/chloe_config/connect.php b/virtual/modules/websites/chloe/chloe_config_dev/connect.php index 2e4439f..2e4439f 100644 --- a/virtual/modules/websites/chloe/chloe_config/connect.php +++ b/virtual/modules/websites/chloe/chloe_config_dev/connect.php | |||
diff --git a/virtual/modules/websites/chloe/chloe_config/ldap.php b/virtual/modules/websites/chloe/chloe_config_dev/ldap.php index 825b7ed..825b7ed 100644 --- a/virtual/modules/websites/chloe/chloe_config/ldap.php +++ b/virtual/modules/websites/chloe/chloe_config_dev/ldap.php | |||
diff --git a/virtual/modules/websites/chloe/chloe_config_prod/chmod.php b/virtual/modules/websites/chloe/chloe_config_prod/chmod.php new file mode 100644 index 0000000..aae16cd --- /dev/null +++ b/virtual/modules/websites/chloe/chloe_config_prod/chmod.php | |||
@@ -0,0 +1,4 @@ | |||
1 | <?php | ||
2 | if (!defined("_ECRIRE_INC_VERSION")) return; | ||
3 | if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', 0777); | ||
4 | ?> \ No newline at end of file | ||
diff --git a/virtual/modules/websites/chloe/chloe_config_prod/connect.php b/virtual/modules/websites/chloe/chloe_config_prod/connect.php new file mode 100644 index 0000000..2e4439f --- /dev/null +++ b/virtual/modules/websites/chloe/chloe_config_prod/connect.php | |||
@@ -0,0 +1,6 @@ | |||
1 | <?php | ||
2 | if (!defined("_ECRIRE_INC_VERSION")) return; | ||
3 | define('_MYSQL_SET_SQL_MODE',true); | ||
4 | $GLOBALS['spip_connect_version'] = 0.7; | ||
5 | spip_connect_db(getenv("SPIP_MYSQL_HOST"),'',getenv("SPIP_MYSQL_USER"),getenv("SPIP_MYSQL_PASSWORD"),getenv("SPIP_MYSQL_DB"),'mysql', 'spip','ldap.php'); | ||
6 | ?> | ||
diff --git a/virtual/modules/websites/chloe/chloe_config_prod/ldap.php b/virtual/modules/websites/chloe/chloe_config_prod/ldap.php new file mode 100644 index 0000000..825b7ed --- /dev/null +++ b/virtual/modules/websites/chloe/chloe_config_prod/ldap.php | |||
@@ -0,0 +1,9 @@ | |||
1 | <?php | ||
2 | if (!defined("_ECRIRE_INC_VERSION")) return; | ||
3 | $GLOBALS['ldap_base'] = getenv("SPIP_LDAP_BASE"); | ||
4 | $GLOBALS['ldap_link'] = @ldap_connect(getenv("SPIP_LDAP_HOST")); | ||
5 | @ldap_set_option($GLOBALS['ldap_link'],LDAP_OPT_PROTOCOL_VERSION,'3'); | ||
6 | @ldap_bind($GLOBALS['ldap_link'],getenv("SPIP_LDAP_SEARCH_DN"), getenv("SPIP_LDAP_SEARCH_PW")); | ||
7 | $GLOBALS['ldap_champs'] = array('login' => array('sAMAccountName','uid','login','userid','cn','sn'),'nom' => 'cn','email' => 'mail','bio' => 'description',); | ||
8 | $GLOBALS['ldap_search'] = getenv("SPIP_LDAP_SEARCH"); | ||
9 | ?> | ||
diff --git a/virtual/modules/websites/chloe/default.nix b/virtual/modules/websites/chloe/default.nix index fb1f602..de85e92 100644 --- a/virtual/modules/websites/chloe/default.nix +++ b/virtual/modules/websites/chloe/default.nix | |||
@@ -52,7 +52,7 @@ in { | |||
52 | (lib.mkIf cfg.integration.enable { | 52 | (lib.mkIf cfg.integration.enable { |
53 | security.acme.certs."eldiron".extraDomains."chloe.immae.eu" = null; | 53 | security.acme.certs."eldiron".extraDomains."chloe.immae.eu" = null; |
54 | services.myPhpfpm.poolConfigs.chloe_dev = chloe_dev.phpFpm.pool; | 54 | services.myPhpfpm.poolConfigs.chloe_dev = chloe_dev.phpFpm.pool; |
55 | services.myPhpfpm.poolPhpConfigs.chloe_prod = '' | 55 | services.myPhpfpm.poolPhpConfigs.chloe_dev = '' |
56 | extension=${pkgs.php}/lib/php/extensions/mysqli.so | 56 | extension=${pkgs.php}/lib/php/extensions/mysqli.so |
57 | ''; | 57 | ''; |
58 | system.activationScripts.chloe_dev = chloe_dev.activationScript; | 58 | system.activationScripts.chloe_dev = chloe_dev.activationScript; |