aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/websites/ftp
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-16 01:08:15 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-16 01:08:15 +0200
commit60dbbd12253f2f7b6994fea1c56fdf3818d0a025 (patch)
treee58fd97aa9734ea7c7e830aa343f807a5a95cb1b /nixops/modules/websites/ftp
parent6e23a06b9d5e0bdb21c737285e36dbe76b2d3ac1 (diff)
downloadNix-60dbbd12253f2f7b6994fea1c56fdf3818d0a025.tar.gz
Nix-60dbbd12253f2f7b6994fea1c56fdf3818d0a025.tar.zst
Nix-60dbbd12253f2f7b6994fea1c56fdf3818d0a025.zip
Move davical and Jerome's website passwords to secure location
Related issue: https://git.immae.eu/mantisbt/view.php?id=122
Diffstat (limited to 'nixops/modules/websites/ftp')
-rw-r--r--nixops/modules/websites/ftp/jerome.nix17
1 files changed, 11 insertions, 6 deletions
diff --git a/nixops/modules/websites/ftp/jerome.nix b/nixops/modules/websites/ftp/jerome.nix
index 199bfab..218060f 100644
--- a/nixops/modules/websites/ftp/jerome.nix
+++ b/nixops/modules/websites/ftp/jerome.nix
@@ -29,8 +29,11 @@ in {
29 domain = "naturaloutil.immae.eu"; 29 domain = "naturaloutil.immae.eu";
30 }; 30 };
31 31
32 services.myPhpfpm.poolConfigs.jerome = let 32 deployment.keys."prod-naturaloutil" = {
33 configFile = pkgs.writeText "naturaloutil.inc.php" '' 33 destDir = "/run/keys/webapps";
34 user = "wwwrun";
35 group = "wwwrun";
36 text = ''
34 <?php 37 <?php
35 $mysql_user = '${env.mysql.user}' ; 38 $mysql_user = '${env.mysql.user}' ;
36 $mysql_server = '${env.mysql.host}' ; 39 $mysql_server = '${env.mysql.host}' ;
@@ -44,8 +47,10 @@ in {
44 '' else ""} 47 '' else ""}
45 $database = connect_db($db, $mysql_server, $mysql_base, $mysql_user, $mysql_password); 48 $database = connect_db($db, $mysql_server, $mysql_base, $mysql_user, $mysql_password);
46 ?> 49 ?>
47 ''; 50 '';
48 in '' 51 };
52 services.myPhpfpm.serviceDependencies.jerome = [ "mysql.service" "prod-naturaloutil-key.service" ];
53 services.myPhpfpm.poolConfigs.jerome = ''
49 listen = /run/phpfpm/naturaloutil.sock 54 listen = /run/phpfpm/naturaloutil.sock
50 user = wwwrun 55 user = wwwrun
51 group = wwwrun 56 group = wwwrun
@@ -56,8 +61,8 @@ in {
56 pm.max_children = 5 61 pm.max_children = 5
57 pm.process_idle_timeout = 60 62 pm.process_idle_timeout = 60
58 63
59 env[BDD_CONNECT] = "${configFile}" 64 env[BDD_CONNECT] = "/run/keys/webapps/prod-naturaloutil"
60 php_admin_value[open_basedir] = "${configFile}:${varDir}:/tmp" 65 php_admin_value[open_basedir] = "/run/keys/webapps/prod-naturaloutil:${varDir}:/tmp"
61 ''; 66 '';
62 services.myPhpfpm.poolPhpConfigs.jerome = '' 67 services.myPhpfpm.poolPhpConfigs.jerome = ''
63 extension=${pkgs.php}/lib/php/extensions/mysqli.so 68 extension=${pkgs.php}/lib/php/extensions/mysqli.so