aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/connexionswing
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-16 17:40:07 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-16 20:20:45 +0200
commit4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0 (patch)
tree9a7ede9ac3f1899074e9ef568a447f883191d3b5 /modules/private/websites/connexionswing
parentda30ae4ffdd153a1eb32fb86f9ca9a65aa19e4e2 (diff)
downloadNix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.gz
Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.zst
Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.zip
Use attrs for secrets instead of lists
Diffstat (limited to 'modules/private/websites/connexionswing')
-rw-r--r--modules/private/websites/connexionswing/integration.nix47
-rw-r--r--modules/private/websites/connexionswing/production.nix55
2 files changed, 48 insertions, 54 deletions
diff --git a/modules/private/websites/connexionswing/integration.nix b/modules/private/websites/connexionswing/integration.nix
index f5b1a16..1b3587a 100644
--- a/modules/private/websites/connexionswing/integration.nix
+++ b/modules/private/websites/connexionswing/integration.nix
@@ -47,31 +47,28 @@ in {
47 phpPackage = pkgs.php72; 47 phpPackage = pkgs.php72;
48 }; 48 };
49 49
50 secrets.keys = [ 50 secrets.keys."websites/connexionswing/integration" = {
51 { 51 user = config.services.httpd.Inte.user;
52 dest = "websites/connexionswing/integration"; 52 group = config.services.httpd.Inte.group;
53 user = config.services.httpd.Inte.user; 53 permissions = "0400";
54 group = config.services.httpd.Inte.group; 54 text = ''
55 permissions = "0400"; 55 # This file is auto-generated during the composer install
56 text = '' 56 parameters:
57 # This file is auto-generated during the composer install 57 database_host: ${secrets.mysql.host}
58 parameters: 58 database_port: ${secrets.mysql.port}
59 database_host: ${secrets.mysql.host} 59 database_name: ${secrets.mysql.database}
60 database_port: ${secrets.mysql.port} 60 database_user: ${secrets.mysql.user}
61 database_name: ${secrets.mysql.database} 61 database_password: ${secrets.mysql.password}
62 database_user: ${secrets.mysql.user} 62 database_server_version: ${pkgs.mariadb.mysqlVersion}
63 database_password: ${secrets.mysql.password} 63 mailer_transport: sendmail
64 database_server_version: ${pkgs.mariadb.mysqlVersion} 64 mailer_host: null
65 mailer_transport: sendmail 65 mailer_user: null
66 mailer_host: null 66 mailer_password: null
67 mailer_user: null 67 subscription_email: ${secrets.email}
68 mailer_password: null 68 allow_robots: true
69 subscription_email: ${secrets.email} 69 secret: ${secrets.secret}
70 allow_robots: true 70 '';
71 secret: ${secrets.secret} 71 };
72 '';
73 }
74 ];
75 72
76 services.websites.env.integration.vhostConfs.connexionswing_integration = { 73 services.websites.env.integration.vhostConfs.connexionswing_integration = {
77 certName = "integration"; 74 certName = "integration";
diff --git a/modules/private/websites/connexionswing/production.nix b/modules/private/websites/connexionswing/production.nix
index f6a059d..981e95e 100644
--- a/modules/private/websites/connexionswing/production.nix
+++ b/modules/private/websites/connexionswing/production.nix
@@ -48,35 +48,32 @@ in {
48 phpPackage = pkgs.php72; 48 phpPackage = pkgs.php72;
49 }; 49 };
50 50
51 secrets.keys = [ 51 secrets.keys."websites/connexionswing/production" = {
52 { 52 user = config.services.httpd.Prod.user;
53 dest = "websites/connexionswing/production"; 53 group = config.services.httpd.Prod.group;
54 user = config.services.httpd.Prod.user; 54 permissions = "0400";
55 group = config.services.httpd.Prod.group; 55 text = ''
56 permissions = "0400"; 56 # This file is auto-generated during the composer install
57 text = '' 57 parameters:
58 # This file is auto-generated during the composer install 58 database_host: ${secrets.mysql.host}
59 parameters: 59 database_port: ${secrets.mysql.port}
60 database_host: ${secrets.mysql.host} 60 database_name: ${secrets.mysql.database}
61 database_port: ${secrets.mysql.port} 61 database_user: ${secrets.mysql.user}
62 database_name: ${secrets.mysql.database} 62 database_password: ${secrets.mysql.password}
63 database_user: ${secrets.mysql.user} 63 database_server_version: ${pkgs.mariadb.mysqlVersion}
64 database_password: ${secrets.mysql.password} 64 mailer_transport: sendmail
65 database_server_version: ${pkgs.mariadb.mysqlVersion} 65 mailer_host: null
66 mailer_transport: sendmail 66 mailer_user: null
67 mailer_host: null 67 mailer_password: null
68 mailer_user: null 68 subscription_email: ${secrets.email}
69 mailer_password: null 69 allow_robots: true
70 subscription_email: ${secrets.email} 70 secret: ${secrets.secret}
71 allow_robots: true 71 services:
72 secret: ${secrets.secret} 72 swiftmailer.mailer.default.transport:
73 services: 73 class: Swift_SendmailTransport
74 swiftmailer.mailer.default.transport: 74 arguments: ['/run/wrappers/bin/sendmail -bs']
75 class: Swift_SendmailTransport 75 '';
76 arguments: ['/run/wrappers/bin/sendmail -bs'] 76 };
77 '';
78 }
79 ];
80 77
81 services.websites.env.production.vhostConfs.connexionswing_production = { 78 services.websites.env.production.vhostConfs.connexionswing_production = {
82 certName = "connexionswing"; 79 certName = "connexionswing";