aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites
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
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')
-rw-r--r--modules/private/websites/chloe/integration.nix43
-rw-r--r--modules/private/websites/chloe/production.nix43
-rw-r--r--modules/private/websites/connexionswing/integration.nix47
-rw-r--r--modules/private/websites/connexionswing/production.nix55
-rw-r--r--modules/private/websites/default.nix5
-rw-r--r--modules/private/websites/florian/app.nix14
-rw-r--r--modules/private/websites/immae/temp.nix33
-rw-r--r--modules/private/websites/isabelle/aten_integration.nix5
-rw-r--r--modules/private/websites/isabelle/aten_production.nix5
-rw-r--r--modules/private/websites/isabelle/iridologie.nix43
-rw-r--r--modules/private/websites/jerome/naturaloutil.nix5
-rw-r--r--modules/private/websites/ludivine/integration.nix73
-rw-r--r--modules/private/websites/ludivine/production.nix73
-rw-r--r--modules/private/websites/piedsjaloux/integration.nix49
-rw-r--r--modules/private/websites/piedsjaloux/production.nix49
-rw-r--r--modules/private/websites/richie/production.nix5
-rw-r--r--modules/private/websites/syden/peertube.nix5
-rw-r--r--modules/private/websites/tools/cloud/default.nix5
-rw-r--r--modules/private/websites/tools/commento/default.nix11
-rw-r--r--modules/private/websites/tools/dav/davical.nix5
-rw-r--r--modules/private/websites/tools/diaspora/default.nix24
-rw-r--r--modules/private/websites/tools/ether/default.nix19
-rw-r--r--modules/private/websites/tools/git/mantisbt.nix5
-rw-r--r--modules/private/websites/tools/mail/roundcubemail.nix5
-rw-r--r--modules/private/websites/tools/mastodon/default.nix5
-rw-r--r--modules/private/websites/tools/mgoblin/default.nix5
-rw-r--r--modules/private/websites/tools/peertube/default.nix5
-rw-r--r--modules/private/websites/tools/performance/default.nix9
-rw-r--r--modules/private/websites/tools/stats/default.nix9
-rw-r--r--modules/private/websites/tools/tools/csp_reports.nix5
-rw-r--r--modules/private/websites/tools/tools/default.nix16
-rw-r--r--modules/private/websites/tools/tools/dmarc_reports.nix5
-rw-r--r--modules/private/websites/tools/tools/kanboard.nix5
-rw-r--r--modules/private/websites/tools/tools/ldap.nix5
-rw-r--r--modules/private/websites/tools/tools/shaarli.nix5
-rw-r--r--modules/private/websites/tools/tools/ttrss.nix5
-rw-r--r--modules/private/websites/tools/tools/wallabag.nix5
-rw-r--r--modules/private/websites/tools/tools/webhooks.nix19
-rw-r--r--modules/private/websites/tools/tools/yourls.nix5
39 files changed, 336 insertions, 398 deletions
diff --git a/modules/private/websites/chloe/integration.nix b/modules/private/websites/chloe/integration.nix
index ffae6ec..c4b79f8 100644
--- a/modules/private/websites/chloe/integration.nix
+++ b/modules/private/websites/chloe/integration.nix
@@ -15,29 +15,26 @@ in {
15 15
16 config = lib.mkIf cfg.enable { 16 config = lib.mkIf cfg.enable {
17 services.duplyBackup.profiles.chloe_integration.rootDir = app.varDir; 17 services.duplyBackup.profiles.chloe_integration.rootDir = app.varDir;
18 secrets.keys = [ 18 secrets.keys."websites/chloe/integration" = {
19 { 19 user = apacheUser;
20 dest = "websites/chloe/integration"; 20 group = apacheGroup;
21 user = apacheUser; 21 permissions = "0400";
22 group = apacheGroup; 22 text = ''
23 permissions = "0400"; 23 SetEnv SPIP_CONFIG_DIR "${./config}"
24 text = '' 24 SetEnv SPIP_VAR_DIR "${app.varDir}"
25 SetEnv SPIP_CONFIG_DIR "${./config}" 25 SetEnv SPIP_SITE "chloe-${app.environment}"
26 SetEnv SPIP_VAR_DIR "${app.varDir}" 26 SetEnv SPIP_LDAP_BASE "dc=immae,dc=eu"
27 SetEnv SPIP_SITE "chloe-${app.environment}" 27 SetEnv SPIP_LDAP_HOST "ldaps://ldap.immae.eu"
28 SetEnv SPIP_LDAP_BASE "dc=immae,dc=eu" 28 SetEnv SPIP_LDAP_SEARCH_DN "${ccfg.ldap.dn}"
29 SetEnv SPIP_LDAP_HOST "ldaps://ldap.immae.eu" 29 SetEnv SPIP_LDAP_SEARCH_PW "${ccfg.ldap.password}"
30 SetEnv SPIP_LDAP_SEARCH_DN "${ccfg.ldap.dn}" 30 SetEnv SPIP_LDAP_SEARCH "${ccfg.ldap.filter}"
31 SetEnv SPIP_LDAP_SEARCH_PW "${ccfg.ldap.password}" 31 SetEnv SPIP_MYSQL_HOST "${ccfg.mysql.host}"
32 SetEnv SPIP_LDAP_SEARCH "${ccfg.ldap.filter}" 32 SetEnv SPIP_MYSQL_PORT "${ccfg.mysql.port}"
33 SetEnv SPIP_MYSQL_HOST "${ccfg.mysql.host}" 33 SetEnv SPIP_MYSQL_DB "${ccfg.mysql.database}"
34 SetEnv SPIP_MYSQL_PORT "${ccfg.mysql.port}" 34 SetEnv SPIP_MYSQL_USER "${ccfg.mysql.user}"
35 SetEnv SPIP_MYSQL_DB "${ccfg.mysql.database}" 35 SetEnv SPIP_MYSQL_PASSWORD "${ccfg.mysql.password}"
36 SetEnv SPIP_MYSQL_USER "${ccfg.mysql.user}" 36 '';
37 SetEnv SPIP_MYSQL_PASSWORD "${ccfg.mysql.password}" 37 };
38 '';
39 }
40 ];
41 systemd.services.phpfpm-chloe_integration.after = lib.mkAfter [ "mysql.service" ]; 38 systemd.services.phpfpm-chloe_integration.after = lib.mkAfter [ "mysql.service" ];
42 systemd.services.phpfpm-chloe_integration.wants = [ "mysql.service" ]; 39 systemd.services.phpfpm-chloe_integration.wants = [ "mysql.service" ];
43 services.phpfpm.pools.chloe_integration = { 40 services.phpfpm.pools.chloe_integration = {
diff --git a/modules/private/websites/chloe/production.nix b/modules/private/websites/chloe/production.nix
index 7f8f1de..92ae05b 100644
--- a/modules/private/websites/chloe/production.nix
+++ b/modules/private/websites/chloe/production.nix
@@ -16,29 +16,26 @@ in {
16 config = lib.mkIf cfg.enable { 16 config = lib.mkIf cfg.enable {
17 services.duplyBackup.profiles.chloe_production.rootDir = app.varDir; 17 services.duplyBackup.profiles.chloe_production.rootDir = app.varDir;
18 services.duplyBackup.profiles.chloe_production.remotes = ["eriomem" "ovh"]; 18 services.duplyBackup.profiles.chloe_production.remotes = ["eriomem" "ovh"];
19 secrets.keys = [ 19 secrets.keys."websites/chloe/production" = {
20 { 20 user = apacheUser;
21 dest = "websites/chloe/production"; 21 group = apacheGroup;
22 user = apacheUser; 22 permissions = "0400";
23 group = apacheGroup; 23 text = ''
24 permissions = "0400"; 24 SetEnv SPIP_CONFIG_DIR "${./config}"
25 text = '' 25 SetEnv SPIP_VAR_DIR "${app.varDir}"
26 SetEnv SPIP_CONFIG_DIR "${./config}" 26 SetEnv SPIP_SITE "chloe-${app.environment}"
27 SetEnv SPIP_VAR_DIR "${app.varDir}" 27 SetEnv SPIP_LDAP_BASE "dc=immae,dc=eu"
28 SetEnv SPIP_SITE "chloe-${app.environment}" 28 SetEnv SPIP_LDAP_HOST "ldaps://ldap.immae.eu"
29 SetEnv SPIP_LDAP_BASE "dc=immae,dc=eu" 29 SetEnv SPIP_LDAP_SEARCH_DN "${ccfg.ldap.dn}"
30 SetEnv SPIP_LDAP_HOST "ldaps://ldap.immae.eu" 30 SetEnv SPIP_LDAP_SEARCH_PW "${ccfg.ldap.password}"
31 SetEnv SPIP_LDAP_SEARCH_DN "${ccfg.ldap.dn}" 31 SetEnv SPIP_LDAP_SEARCH "${ccfg.ldap.filter}"
32 SetEnv SPIP_LDAP_SEARCH_PW "${ccfg.ldap.password}" 32 SetEnv SPIP_MYSQL_HOST "${ccfg.mysql.host}"
33 SetEnv SPIP_LDAP_SEARCH "${ccfg.ldap.filter}" 33 SetEnv SPIP_MYSQL_PORT "${ccfg.mysql.port}"
34 SetEnv SPIP_MYSQL_HOST "${ccfg.mysql.host}" 34 SetEnv SPIP_MYSQL_DB "${ccfg.mysql.database}"
35 SetEnv SPIP_MYSQL_PORT "${ccfg.mysql.port}" 35 SetEnv SPIP_MYSQL_USER "${ccfg.mysql.user}"
36 SetEnv SPIP_MYSQL_DB "${ccfg.mysql.database}" 36 SetEnv SPIP_MYSQL_PASSWORD "${ccfg.mysql.password}"
37 SetEnv SPIP_MYSQL_USER "${ccfg.mysql.user}" 37 '';
38 SetEnv SPIP_MYSQL_PASSWORD "${ccfg.mysql.password}" 38 };
39 '';
40 }
41 ];
42 services.webstats.sites = [ { name = "osteopathe-cc.fr"; } ]; 39 services.webstats.sites = [ { name = "osteopathe-cc.fr"; } ];
43 40
44 systemd.services.phpfpm-chloe_production.after = lib.mkAfter [ "mysql.service" ]; 41 systemd.services.phpfpm-chloe_production.after = lib.mkAfter [ "mysql.service" ];
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";
diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix
index 8fb6a4d..e819324 100644
--- a/modules/private/websites/default.nix
+++ b/modules/private/websites/default.nix
@@ -109,8 +109,7 @@ in
109 users.users.wwwrun.extraGroups = [ "keys" ]; 109 users.users.wwwrun.extraGroups = [ "keys" ];
110 networking.firewall.allowedTCPPorts = [ 80 443 ]; 110 networking.firewall.allowedTCPPorts = [ 80 443 ];
111 111
112 secrets.keys = [{ 112 secrets.keys."apache-ldap" = {
113 dest = "apache-ldap";
114 user = "wwwrun"; 113 user = "wwwrun";
115 group = "wwwrun"; 114 group = "wwwrun";
116 permissions = "0400"; 115 permissions = "0400";
@@ -126,7 +125,7 @@ in
126 </IfModule> 125 </IfModule>
127 </Macro> 126 </Macro>
128 ''; 127 '';
129 }]; 128 };
130 129
131 system.activationScripts = { 130 system.activationScripts = {
132 httpd = '' 131 httpd = ''
diff --git a/modules/private/websites/florian/app.nix b/modules/private/websites/florian/app.nix
index 14358d8..87e622a 100644
--- a/modules/private/websites/florian/app.nix
+++ b/modules/private/websites/florian/app.nix
@@ -46,18 +46,16 @@ in {
46 phpPackage = pkgs.php72; 46 phpPackage = pkgs.php72;
47 }; 47 };
48 48
49 secrets.keys = [ 49 secrets.keys = {
50 { 50 "websites/florian/app_passwords" = {
51 dest = "websites/florian/app_passwords";
52 user = config.services.httpd.Inte.user; 51 user = config.services.httpd.Inte.user;
53 group = config.services.httpd.Inte.group; 52 group = config.services.httpd.Inte.group;
54 permissions = "0400"; 53 permissions = "0400";
55 text = '' 54 text = ''
56 invite:${secrets.invite_passwords} 55 invite:${secrets.invite_passwords}
57 ''; 56 '';
58 } 57 };
59 { 58 "websites/florian/app" = {
60 dest = "websites/florian/app";
61 user = config.services.httpd.Inte.user; 59 user = config.services.httpd.Inte.user;
62 group = config.services.httpd.Inte.group; 60 group = config.services.httpd.Inte.group;
63 permissions = "0400"; 61 permissions = "0400";
@@ -75,8 +73,8 @@ in {
75 mailer_password: null 73 mailer_password: null
76 secret: ${secrets.secret} 74 secret: ${secrets.secret}
77 ''; 75 '';
78 } 76 };
79 ]; 77 };
80 78
81 services.websites.env.integration.modules = adminer.apache.modules; 79 services.websites.env.integration.modules = adminer.apache.modules;
82 services.websites.env.integration.vhostConfs.florian_app = { 80 services.websites.env.integration.vhostConfs.florian_app = {
diff --git a/modules/private/websites/immae/temp.nix b/modules/private/websites/immae/temp.nix
index 8518283..61ed9cf 100644
--- a/modules/private/websites/immae/temp.nix
+++ b/modules/private/websites/immae/temp.nix
@@ -28,24 +28,21 @@ in {
28 '' ]; 28 '' ];
29 }; 29 };
30 30
31 secrets.keys = [ 31 secrets.keys."webapps/surfer" = {
32 { 32 permissions = "0400";
33 dest = "webapps/surfer"; 33 user = "wwwrun";
34 permissions = "0400"; 34 group = "wwwrun";
35 user = "wwwrun"; 35 text = ''
36 group = "wwwrun"; 36 CLOUDRON_LDAP_URL=ldaps://${env.ldap.host}
37 text = '' 37 CLOUDRON_LDAP_USERS_BASE_DN=${env.ldap.base}
38 CLOUDRON_LDAP_URL=ldaps://${env.ldap.host} 38 TOKENSTORE_FILE=/var/lib/surfer/tokens.json
39 CLOUDRON_LDAP_USERS_BASE_DN=${env.ldap.base} 39 CLOUDRON_LDAP_BIND_DN=${env.ldap.dn}
40 TOKENSTORE_FILE=/var/lib/surfer/tokens.json 40 CLOUDRON_LDAP_BIND_PASSWORD=${env.ldap.password}
41 CLOUDRON_LDAP_BIND_DN=${env.ldap.dn} 41 CLOUDRON_LDAP_USERS_BASE_DN=${env.ldap.base}
42 CLOUDRON_LDAP_BIND_PASSWORD=${env.ldap.password} 42 CLOUDRON_LDAP_FILTER="${env.ldap.filter}"
43 CLOUDRON_LDAP_USERS_BASE_DN=${env.ldap.base} 43 LISTEN=/run/surfer/listen.sock
44 CLOUDRON_LDAP_FILTER="${env.ldap.filter}" 44 '';
45 LISTEN=/run/surfer/listen.sock 45 };
46 '';
47 }
48 ];
49 46
50 systemd.services.surfer = { 47 systemd.services.surfer = {
51 description = "Surfer"; 48 description = "Surfer";
diff --git a/modules/private/websites/isabelle/aten_integration.nix b/modules/private/websites/isabelle/aten_integration.nix
index 6f8f985..899ee66 100644
--- a/modules/private/websites/isabelle/aten_integration.nix
+++ b/modules/private/websites/isabelle/aten_integration.nix
@@ -41,8 +41,7 @@ in {
41 phpPackage = pkgs.php72; 41 phpPackage = pkgs.php72;
42 }; 42 };
43 43
44 secrets.keys = [{ 44 secrets.keys."websites/isabelle/aten_integration" = {
45 dest = "websites/isabelle/aten_integration";
46 user = config.services.httpd.Inte.user; 45 user = config.services.httpd.Inte.user;
47 group = config.services.httpd.Inte.group; 46 group = config.services.httpd.Inte.group;
48 permissions = "0400"; 47 permissions = "0400";
@@ -56,7 +55,7 @@ in {
56 SetEnv APP_SECRET "${secrets.secret}" 55 SetEnv APP_SECRET "${secrets.secret}"
57 SetEnv DATABASE_URL "${psql_url}" 56 SetEnv DATABASE_URL "${psql_url}"
58 ''; 57 '';
59 }]; 58 };
60 services.websites.env.integration.vhostConfs.isabelle_aten_integration = { 59 services.websites.env.integration.vhostConfs.isabelle_aten_integration = {
61 certName = "integration"; 60 certName = "integration";
62 addToCerts = true; 61 addToCerts = true;
diff --git a/modules/private/websites/isabelle/aten_production.nix b/modules/private/websites/isabelle/aten_production.nix
index 3671712..b8d12b9 100644
--- a/modules/private/websites/isabelle/aten_production.nix
+++ b/modules/private/websites/isabelle/aten_production.nix
@@ -42,8 +42,7 @@ in {
42 phpPackage = pkgs.php72; 42 phpPackage = pkgs.php72;
43 }; 43 };
44 44
45 secrets.keys = [{ 45 secrets.keys."websites/isabelle/aten_production" = {
46 dest = "websites/isabelle/aten_production";
47 user = config.services.httpd.Prod.user; 46 user = config.services.httpd.Prod.user;
48 group = config.services.httpd.Prod.group; 47 group = config.services.httpd.Prod.group;
49 permissions = "0400"; 48 permissions = "0400";
@@ -57,7 +56,7 @@ in {
57 SetEnv APP_SECRET "${secrets.secret}" 56 SetEnv APP_SECRET "${secrets.secret}"
58 SetEnv DATABASE_URL "${psql_url}" 57 SetEnv DATABASE_URL "${psql_url}"
59 ''; 58 '';
60 }]; 59 };
61 services.websites.env.production.vhostConfs.isabelle_aten_production = { 60 services.websites.env.production.vhostConfs.isabelle_aten_production = {
62 certName = "isabelle"; 61 certName = "isabelle";
63 certMainHost = "aten.pro"; 62 certMainHost = "aten.pro";
diff --git a/modules/private/websites/isabelle/iridologie.nix b/modules/private/websites/isabelle/iridologie.nix
index 14296bf..decda36 100644
--- a/modules/private/websites/isabelle/iridologie.nix
+++ b/modules/private/websites/isabelle/iridologie.nix
@@ -18,29 +18,26 @@ in {
18 config = lib.mkIf cfg.enable { 18 config = lib.mkIf cfg.enable {
19 services.duplyBackup.profiles.isabelle_iridologie.rootDir = app.varDir; 19 services.duplyBackup.profiles.isabelle_iridologie.rootDir = app.varDir;
20 services.duplyBackup.profiles.isabelle_iridologie.remotes = ["eriomem" "ovh"]; 20 services.duplyBackup.profiles.isabelle_iridologie.remotes = ["eriomem" "ovh"];
21 secrets.keys = [ 21 secrets.keys."websites/isabelle/iridologie" = {
22 { 22 user = apacheUser;
23 dest = "websites/isabelle/iridologie"; 23 group = apacheGroup;
24 user = apacheUser; 24 permissions = "0400";
25 group = apacheGroup; 25 text = ''
26 permissions = "0400"; 26 SetEnv SPIP_CONFIG_DIR "${./config}"
27 text = '' 27 SetEnv SPIP_VAR_DIR "${app.varDir}"
28 SetEnv SPIP_CONFIG_DIR "${./config}" 28 SetEnv SPIP_SITE "iridologie-${app.environment}"
29 SetEnv SPIP_VAR_DIR "${app.varDir}" 29 SetEnv SPIP_LDAP_BASE "dc=immae,dc=eu"
30 SetEnv SPIP_SITE "iridologie-${app.environment}" 30 SetEnv SPIP_LDAP_HOST "ldaps://ldap.immae.eu"
31 SetEnv SPIP_LDAP_BASE "dc=immae,dc=eu" 31 SetEnv SPIP_LDAP_SEARCH_DN "${icfg.ldap.dn}"
32 SetEnv SPIP_LDAP_HOST "ldaps://ldap.immae.eu" 32 SetEnv SPIP_LDAP_SEARCH_PW "${icfg.ldap.password}"
33 SetEnv SPIP_LDAP_SEARCH_DN "${icfg.ldap.dn}" 33 SetEnv SPIP_LDAP_SEARCH "${icfg.ldap.filter}"
34 SetEnv SPIP_LDAP_SEARCH_PW "${icfg.ldap.password}" 34 SetEnv SPIP_MYSQL_HOST "${icfg.mysql.host}"
35 SetEnv SPIP_LDAP_SEARCH "${icfg.ldap.filter}" 35 SetEnv SPIP_MYSQL_PORT "${icfg.mysql.port}"
36 SetEnv SPIP_MYSQL_HOST "${icfg.mysql.host}" 36 SetEnv SPIP_MYSQL_DB "${icfg.mysql.database}"
37 SetEnv SPIP_MYSQL_PORT "${icfg.mysql.port}" 37 SetEnv SPIP_MYSQL_USER "${icfg.mysql.user}"
38 SetEnv SPIP_MYSQL_DB "${icfg.mysql.database}" 38 SetEnv SPIP_MYSQL_PASSWORD "${icfg.mysql.password}"
39 SetEnv SPIP_MYSQL_USER "${icfg.mysql.user}" 39 '';
40 SetEnv SPIP_MYSQL_PASSWORD "${icfg.mysql.password}" 40 };
41 '';
42 }
43 ];
44 services.webstats.sites = [ { name = "iridologie.icommandeur.org"; } ]; 41 services.webstats.sites = [ { name = "iridologie.icommandeur.org"; } ];
45 42
46 systemd.services.phpfpm-isabelle_iridologie.after = lib.mkAfter [ "mysql.service" ]; 43 systemd.services.phpfpm-isabelle_iridologie.after = lib.mkAfter [ "mysql.service" ];
diff --git a/modules/private/websites/jerome/naturaloutil.nix b/modules/private/websites/jerome/naturaloutil.nix
index 95d7e78..0974ce3 100644
--- a/modules/private/websites/jerome/naturaloutil.nix
+++ b/modules/private/websites/jerome/naturaloutil.nix
@@ -15,8 +15,7 @@ in {
15 15
16 security.acme.certs."ftp".extraDomains."naturaloutil.immae.eu" = null; 16 security.acme.certs."ftp".extraDomains."naturaloutil.immae.eu" = null;
17 17
18 secrets.keys = [{ 18 secrets.keys."websites/jerome/naturaloutil" = {
19 dest = "websites/jerome/naturaloutil";
20 user = apacheUser; 19 user = apacheUser;
21 group = apacheGroup; 20 group = apacheGroup;
22 permissions = "0400"; 21 permissions = "0400";
@@ -35,7 +34,7 @@ in {
35 $database = connect_db($db, $mysql_server, $mysql_base, $mysql_user, $mysql_password); 34 $database = connect_db($db, $mysql_server, $mysql_base, $mysql_user, $mysql_password);
36 ?> 35 ?>
37 ''; 36 '';
38 }]; 37 };
39 system.activationScripts.jerome_naturaloutil = { 38 system.activationScripts.jerome_naturaloutil = {
40 deps = [ "httpd" ]; 39 deps = [ "httpd" ];
41 text = '' 40 text = ''
diff --git a/modules/private/websites/ludivine/integration.nix b/modules/private/websites/ludivine/integration.nix
index 4357b93..cfef385 100644
--- a/modules/private/websites/ludivine/integration.nix
+++ b/modules/private/websites/ludivine/integration.nix
@@ -50,44 +50,41 @@ in {
50 phpPackage = pkgs.php72; 50 phpPackage = pkgs.php72;
51 }; 51 };
52 52
53 secrets.keys = [ 53 secrets.keys."websites/ludivine/integration" = {
54 { 54 user = config.services.httpd.Inte.user;
55 dest = "websites/ludivine/integration"; 55 group = config.services.httpd.Inte.group;
56 user = config.services.httpd.Inte.user; 56 permissions = "0400";
57 group = config.services.httpd.Inte.group; 57 text = ''
58 permissions = "0400"; 58 # This file is auto-generated during the composer install
59 text = '' 59 parameters:
60 # This file is auto-generated during the composer install 60 database_host: ${secrets.mysql.host}
61 parameters: 61 database_port: ${secrets.mysql.port}
62 database_host: ${secrets.mysql.host} 62 database_name: ${secrets.mysql.database}
63 database_port: ${secrets.mysql.port} 63 database_user: ${secrets.mysql.user}
64 database_name: ${secrets.mysql.database} 64 database_password: ${secrets.mysql.password}
65 database_user: ${secrets.mysql.user} 65 database_server_version: ${pkgs.mariadb.mysqlVersion}
66 database_password: ${secrets.mysql.password} 66 mailer_transport: smtp
67 database_server_version: ${pkgs.mariadb.mysqlVersion} 67 mailer_host: 127.0.0.1
68 mailer_transport: smtp 68 mailer_user: null
69 mailer_host: 127.0.0.1 69 mailer_password: null
70 mailer_user: null 70 secret: ${secrets.secret}
71 mailer_password: null 71 ldap_host: ldap.immae.eu
72 secret: ${secrets.secret} 72 ldap_port: 636
73 ldap_host: ldap.immae.eu 73 ldap_version: 3
74 ldap_port: 636 74 ldap_ssl: true
75 ldap_version: 3 75 ldap_tls: false
76 ldap_ssl: true 76 ldap_user_bind: 'uid={username},ou=users,dc=immae,dc=eu'
77 ldap_tls: false 77 ldap_base_dn: 'dc=immae,dc=eu'
78 ldap_user_bind: 'uid={username},ou=users,dc=immae,dc=eu' 78 ldap_search_dn: '${secrets.ldap.dn}'
79 ldap_base_dn: 'dc=immae,dc=eu' 79 ldap_search_password: '${secrets.ldap.password}'
80 ldap_search_dn: '${secrets.ldap.dn}' 80 ldap_search_filter: '${secrets.ldap.filter}'
81 ldap_search_password: '${secrets.ldap.password}' 81 leapt_im:
82 ldap_search_filter: '${secrets.ldap.filter}' 82 binary_path: ${pkgs.imagemagick}/bin
83 leapt_im: 83 assetic:
84 binary_path: ${pkgs.imagemagick}/bin 84 sass: ${pkgs.sass}/bin/sass
85 assetic: 85 ruby: ${pkgs.ruby}/bin/ruby
86 sass: ${pkgs.sass}/bin/sass 86 '';
87 ruby: ${pkgs.ruby}/bin/ruby 87 };
88 '';
89 }
90 ];
91 88
92 services.websites.env.integration.vhostConfs.ludivine_integration = { 89 services.websites.env.integration.vhostConfs.ludivine_integration = {
93 certName = "integration"; 90 certName = "integration";
diff --git a/modules/private/websites/ludivine/production.nix b/modules/private/websites/ludivine/production.nix
index 3a9895d..73b63a2 100644
--- a/modules/private/websites/ludivine/production.nix
+++ b/modules/private/websites/ludivine/production.nix
@@ -53,44 +53,41 @@ in {
53 phpPackage = pkgs.php72; 53 phpPackage = pkgs.php72;
54 }; 54 };
55 55
56 secrets.keys = [ 56 secrets.keys."websites/ludivine/production" = {
57 { 57 user = config.services.httpd.Prod.user;
58 dest = "websites/ludivine/production"; 58 group = config.services.httpd.Prod.group;
59 user = config.services.httpd.Prod.user; 59 permissions = "0400";
60 group = config.services.httpd.Prod.group; 60 text = ''
61 permissions = "0400"; 61 # This file is auto-generated during the composer install
62 text = '' 62 parameters:
63 # This file is auto-generated during the composer install 63 database_host: ${secrets.mysql.host}
64 parameters: 64 database_port: ${secrets.mysql.port}
65 database_host: ${secrets.mysql.host} 65 database_name: ${secrets.mysql.database}
66 database_port: ${secrets.mysql.port} 66 database_user: ${secrets.mysql.user}
67 database_name: ${secrets.mysql.database} 67 database_password: ${secrets.mysql.password}
68 database_user: ${secrets.mysql.user} 68 database_server_version: ${pkgs.mariadb.mysqlVersion}
69 database_password: ${secrets.mysql.password} 69 mailer_transport: smtp
70 database_server_version: ${pkgs.mariadb.mysqlVersion} 70 mailer_host: 127.0.0.1
71 mailer_transport: smtp 71 mailer_user: null
72 mailer_host: 127.0.0.1 72 mailer_password: null
73 mailer_user: null 73 secret: ${secrets.secret}
74 mailer_password: null 74 ldap_host: ldap.immae.eu
75 secret: ${secrets.secret} 75 ldap_port: 636
76 ldap_host: ldap.immae.eu 76 ldap_version: 3
77 ldap_port: 636 77 ldap_ssl: true
78 ldap_version: 3 78 ldap_tls: false
79 ldap_ssl: true 79 ldap_user_bind: 'uid={username},ou=users,dc=immae,dc=eu'
80 ldap_tls: false 80 ldap_base_dn: 'dc=immae,dc=eu'
81 ldap_user_bind: 'uid={username},ou=users,dc=immae,dc=eu' 81 ldap_search_dn: '${secrets.ldap.dn}'
82 ldap_base_dn: 'dc=immae,dc=eu' 82 ldap_search_password: '${secrets.ldap.password}'
83 ldap_search_dn: '${secrets.ldap.dn}' 83 ldap_search_filter: '${secrets.ldap.filter}'
84 ldap_search_password: '${secrets.ldap.password}' 84 leapt_im:
85 ldap_search_filter: '${secrets.ldap.filter}' 85 binary_path: ${pkgs.imagemagick}/bin
86 leapt_im: 86 assetic:
87 binary_path: ${pkgs.imagemagick}/bin 87 sass: ${pkgs.sass}/bin/sass
88 assetic: 88 ruby: ${pkgs.ruby}/bin/ruby
89 sass: ${pkgs.sass}/bin/sass 89 '';
90 ruby: ${pkgs.ruby}/bin/ruby 90 };
91 '';
92 }
93 ];
94 91
95 services.websites.env.production.vhostConfs.ludivine_production = { 92 services.websites.env.production.vhostConfs.ludivine_production = {
96 certName = "ludivine"; 93 certName = "ludivine";
diff --git a/modules/private/websites/piedsjaloux/integration.nix b/modules/private/websites/piedsjaloux/integration.nix
index dc98900..f501eba 100644
--- a/modules/private/websites/piedsjaloux/integration.nix
+++ b/modules/private/websites/piedsjaloux/integration.nix
@@ -52,32 +52,29 @@ in {
52 phpPackage = pkgs.php72; 52 phpPackage = pkgs.php72;
53 }; 53 };
54 54
55 secrets.keys = [ 55 secrets.keys."websites/piedsjaloux/integration" = {
56 { 56 user = config.services.httpd.Inte.user;
57 dest = "websites/piedsjaloux/integration"; 57 group = config.services.httpd.Inte.group;
58 user = config.services.httpd.Inte.user; 58 permissions = "0400";
59 group = config.services.httpd.Inte.group; 59 text = ''
60 permissions = "0400"; 60 # This file is auto-generated during the composer install
61 text = '' 61 parameters:
62 # This file is auto-generated during the composer install 62 database_host: ${secrets.mysql.host}
63 parameters: 63 database_port: ${secrets.mysql.port}
64 database_host: ${secrets.mysql.host} 64 database_name: ${secrets.mysql.database}
65 database_port: ${secrets.mysql.port} 65 database_user: ${secrets.mysql.user}
66 database_name: ${secrets.mysql.database} 66 database_password: ${secrets.mysql.password}
67 database_user: ${secrets.mysql.user} 67 database_server_version: ${pkgs.mariadb.mysqlVersion}
68 database_password: ${secrets.mysql.password} 68 mailer_transport: smtp
69 database_server_version: ${pkgs.mariadb.mysqlVersion} 69 mailer_host: 127.0.0.1
70 mailer_transport: smtp 70 mailer_user: null
71 mailer_host: 127.0.0.1 71 mailer_password: null
72 mailer_user: null 72 secret: ${secrets.secret}
73 mailer_password: null 73 pdflatex: "${texlive}/bin/pdflatex"
74 secret: ${secrets.secret} 74 leapt_im:
75 pdflatex: "${texlive}/bin/pdflatex" 75 binary_path: ${pkgs.imagemagick}/bin
76 leapt_im: 76 '';
77 binary_path: ${pkgs.imagemagick}/bin 77 };
78 '';
79 }
80 ];
81 78
82 services.websites.env.integration.vhostConfs.piedsjaloux_integration = { 79 services.websites.env.integration.vhostConfs.piedsjaloux_integration = {
83 certName = "integration"; 80 certName = "integration";
diff --git a/modules/private/websites/piedsjaloux/production.nix b/modules/private/websites/piedsjaloux/production.nix
index e12b046..fed5a0f 100644
--- a/modules/private/websites/piedsjaloux/production.nix
+++ b/modules/private/websites/piedsjaloux/production.nix
@@ -55,32 +55,29 @@ in {
55 phpPackage = pkgs.php72; 55 phpPackage = pkgs.php72;
56 }; 56 };
57 57
58 secrets.keys = [ 58 secrets.keys."websites/piedsjaloux/production" = {
59 { 59 user = config.services.httpd.Prod.user;
60 dest = "websites/piedsjaloux/production"; 60 group = config.services.httpd.Prod.group;
61 user = config.services.httpd.Prod.user; 61 permissions = "0400";
62 group = config.services.httpd.Prod.group; 62 text = ''
63 permissions = "0400"; 63 # This file is auto-generated during the composer install
64 text = '' 64 parameters:
65 # This file is auto-generated during the composer install 65 database_host: ${secrets.mysql.host}
66 parameters: 66 database_port: ${secrets.mysql.port}
67 database_host: ${secrets.mysql.host} 67 database_name: ${secrets.mysql.database}
68 database_port: ${secrets.mysql.port} 68 database_user: ${secrets.mysql.user}
69 database_name: ${secrets.mysql.database} 69 database_password: ${secrets.mysql.password}
70 database_user: ${secrets.mysql.user} 70 database_server_version: ${pkgs.mariadb.mysqlVersion}
71 database_password: ${secrets.mysql.password} 71 mailer_transport: smtp
72 database_server_version: ${pkgs.mariadb.mysqlVersion} 72 mailer_host: 127.0.0.1
73 mailer_transport: smtp 73 mailer_user: null
74 mailer_host: 127.0.0.1 74 mailer_password: null
75 mailer_user: null 75 secret: ${secrets.secret}
76 mailer_password: null 76 pdflatex: "${texlive}/bin/pdflatex"
77 secret: ${secrets.secret} 77 leapt_im:
78 pdflatex: "${texlive}/bin/pdflatex" 78 binary_path: ${pkgs.imagemagick}/bin
79 leapt_im: 79 '';
80 binary_path: ${pkgs.imagemagick}/bin 80 };
81 '';
82 }
83 ];
84 81
85 services.websites.env.production.vhostConfs.piedsjaloux_production = { 82 services.websites.env.production.vhostConfs.piedsjaloux_production = {
86 certName = "piedsjaloux"; 83 certName = "piedsjaloux";
diff --git a/modules/private/websites/richie/production.nix b/modules/private/websites/richie/production.nix
index 2d85175..3efa9f0 100644
--- a/modules/private/websites/richie/production.nix
+++ b/modules/private/websites/richie/production.nix
@@ -29,8 +29,7 @@ in
29 services.duplyBackup.profiles.richie_production.remotes = ["eriomem" "ovh"]; 29 services.duplyBackup.profiles.richie_production.remotes = ["eriomem" "ovh"];
30 services.webstats.sites = [ { name = "europe-richie.org"; } ]; 30 services.webstats.sites = [ { name = "europe-richie.org"; } ];
31 31
32 secrets.keys = [{ 32 secrets.keys."websites/richie/production" = {
33 dest = "websites/richie/production";
34 user = apacheUser; 33 user = apacheUser;
35 group = apacheGroup; 34 group = apacheGroup;
36 permissions = "0400"; 35 permissions = "0400";
@@ -48,7 +47,7 @@ in
48 $smtp_mailer->Auth('${smtp_mailer.user}', '${smtp_mailer.password}'); 47 $smtp_mailer->Auth('${smtp_mailer.user}', '${smtp_mailer.password}');
49 ?> 48 ?>
50 ''; 49 '';
51 }]; 50 };
52 services.websites.webappDirs.richie_production = richieSrc; 51 services.websites.webappDirs.richie_production = richieSrc;
53 system.activationScripts.richie_production = { 52 system.activationScripts.richie_production = {
54 deps = [ "httpd" ]; 53 deps = [ "httpd" ];
diff --git a/modules/private/websites/syden/peertube.nix b/modules/private/websites/syden/peertube.nix
index aa465d7..4036eac 100644
--- a/modules/private/websites/syden/peertube.nix
+++ b/modules/private/websites/syden/peertube.nix
@@ -23,8 +23,7 @@ in
23 }; 23 };
24 users.groups.peertube.gid = config.ids.gids.peertube; 24 users.groups.peertube.gid = config.ids.gids.peertube;
25 25
26 secrets.keys = [{ 26 secrets.keys."websites/syden/peertube" = {
27 dest = "websites/syden/peertube";
28 user = "peertube"; 27 user = "peertube";
29 group = "peertube"; 28 group = "peertube";
30 permissions = "0640"; 29 permissions = "0640";
@@ -67,7 +66,7 @@ in
67 plugins: '${dataDir}/storage/plugins/' 66 plugins: '${dataDir}/storage/plugins/'
68 client_overrides: '${dataDir}/storage/client-overrides/' 67 client_overrides: '${dataDir}/storage/client-overrides/'
69 ''; 68 '';
70 }]; 69 };
71 70
72 services.filesWatcher.syden_peertube = { 71 services.filesWatcher.syden_peertube = {
73 restart = true; 72 restart = true;
diff --git a/modules/private/websites/tools/cloud/default.nix b/modules/private/websites/tools/cloud/default.nix
index 471858a..fc0aae6 100644
--- a/modules/private/websites/tools/cloud/default.nix
+++ b/modules/private/websites/tools/cloud/default.nix
@@ -73,8 +73,7 @@ in {
73 ]; 73 ];
74 }; 74 };
75 75
76 secrets.keys = [{ 76 secrets.keys."webapps/tools-nextcloud" = {
77 dest = "webapps/tools-nextcloud";
78 user = "wwwrun"; 77 user = "wwwrun";
79 group = "wwwrun"; 78 group = "wwwrun";
80 permissions = "0600"; 79 permissions = "0600";
@@ -133,7 +132,7 @@ in {
133 'has_rebuilt_cache' => true, 132 'has_rebuilt_cache' => true,
134 ); 133 );
135 ''; 134 '';
136 }]; 135 };
137 users.users.root.packages = let 136 users.users.root.packages = let
138 occ = pkgs.writeScriptBin "nextcloud-occ" '' 137 occ = pkgs.writeScriptBin "nextcloud-occ" ''
139 #! ${pkgs.stdenv.shell} 138 #! ${pkgs.stdenv.shell}
diff --git a/modules/private/websites/tools/commento/default.nix b/modules/private/websites/tools/commento/default.nix
index d0e7d24..c36255b 100644
--- a/modules/private/websites/tools/commento/default.nix
+++ b/modules/private/websites/tools/commento/default.nix
@@ -12,10 +12,9 @@ in
12 enable = lib.mkEnableOption "Enable commento website"; 12 enable = lib.mkEnableOption "Enable commento website";
13 }; 13 };
14 config = lib.mkIf cfg.enable { 14 config = lib.mkIf cfg.enable {
15 secrets.keys = [ 15 secrets.keys = {
16 { 16 "commento/env" = {
17 dest = "commento/env"; 17 permissions = "0400";
18 permission = "0400";
19 text = '' 18 text = ''
20 COMMENTO_ORIGIN=https://commento.immae.eu/ 19 COMMENTO_ORIGIN=https://commento.immae.eu/
21 COMMENTO_PORT=${port} 20 COMMENTO_PORT=${port}
@@ -29,8 +28,8 @@ in
29 COMMENTO_SMTP_PASSWORD=${env.smtp.password} 28 COMMENTO_SMTP_PASSWORD=${env.smtp.password}
30 COMMENTO_SMTP_FROM_ADDRESS=${env.smtp.email} 29 COMMENTO_SMTP_FROM_ADDRESS=${env.smtp.email}
31 ''; 30 '';
32 } 31 };
33 ]; 32 };
34 33
35 services.websites.env.tools.vhostConfs.commento = { 34 services.websites.env.tools.vhostConfs.commento = {
36 certName = "eldiron"; 35 certName = "eldiron";
diff --git a/modules/private/websites/tools/dav/davical.nix b/modules/private/websites/tools/dav/davical.nix
index eeac1b5..9e4056a 100644
--- a/modules/private/websites/tools/dav/davical.nix
+++ b/modules/private/websites/tools/dav/davical.nix
@@ -6,8 +6,7 @@ rec {
6 install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/davical 6 install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/davical
7 ''; 7 '';
8 }; 8 };
9 keys = [{ 9 keys."webapps/dav-davical" = {
10 dest = "webapps/dav-davical";
11 user = apache.user; 10 user = apache.user;
12 group = apache.group; 11 group = apache.group;
13 permissions = "0400"; 12 permissions = "0400";
@@ -64,7 +63,7 @@ rec {
64 $c->do_not_sync_from_ldap = array('admin' => true); 63 $c->do_not_sync_from_ldap = array('admin' => true);
65 include('drivers_ldap.php'); 64 include('drivers_ldap.php');
66 ''; 65 '';
67 }]; 66 };
68 webapp = davical.override { davical_config = config.secrets.fullPaths."webapps/dav-davical"; }; 67 webapp = davical.override { davical_config = config.secrets.fullPaths."webapps/dav-davical"; };
69 webRoot = "${webapp}/htdocs"; 68 webRoot = "${webapp}/htdocs";
70 apache = rec { 69 apache = rec {
diff --git a/modules/private/websites/tools/diaspora/default.nix b/modules/private/websites/tools/diaspora/default.nix
index 663fe88..9119ead 100644
--- a/modules/private/websites/tools/diaspora/default.nix
+++ b/modules/private/websites/tools/diaspora/default.nix
@@ -16,16 +16,14 @@ in {
16 }; 16 };
17 users.users.diaspora.extraGroups = [ "keys" ]; 17 users.users.diaspora.extraGroups = [ "keys" ];
18 18
19 secrets.keys = [ 19 secrets.keys = {
20 { 20 "webapps/diaspora" = {
21 dest = "webapps/diaspora";
22 isDir = true; 21 isDir = true;
23 user = "diaspora"; 22 user = "diaspora";
24 group = "diaspora"; 23 group = "diaspora";
25 permissions = "0500"; 24 permissions = "0500";
26 } 25 };
27 { 26 "webapps/diaspora/diaspora.yml" = {
28 dest = "webapps/diaspora/diaspora.yml";
29 user = "diaspora"; 27 user = "diaspora";
30 group = "diaspora"; 28 group = "diaspora";
31 permissions = "0400"; 29 permissions = "0400";
@@ -102,9 +100,8 @@ in {
102 development: 100 development:
103 environment: 101 environment:
104 ''; 102 '';
105 } 103 };
106 { 104 "webapps/diaspora/database.yml" = {
107 dest = "webapps/diaspora/database.yml";
108 user = "diaspora"; 105 user = "diaspora";
109 group = "diaspora"; 106 group = "diaspora";
110 permissions = "0400"; 107 permissions = "0400";
@@ -136,17 +133,16 @@ in {
136 <<: *combined 133 <<: *combined
137 database: diaspora_integration2 134 database: diaspora_integration2
138 ''; 135 '';
139 } 136 };
140 { 137 "webapps/diaspora/secret_token.rb" = {
141 dest = "webapps/diaspora/secret_token.rb";
142 user = "diaspora"; 138 user = "diaspora";
143 group = "diaspora"; 139 group = "diaspora";
144 permissions = "0400"; 140 permissions = "0400";
145 text = '' 141 text = ''
146 Diaspora::Application.config.secret_key_base = '${env.secret_token}' 142 Diaspora::Application.config.secret_key_base = '${env.secret_token}'
147 ''; 143 '';
148 } 144 };
149 ]; 145 };
150 146
151 services.diaspora = { 147 services.diaspora = {
152 enable = true; 148 enable = true;
diff --git a/modules/private/websites/tools/ether/default.nix b/modules/private/websites/tools/ether/default.nix
index 64e411d..d5c65a9 100644
--- a/modules/private/websites/tools/ether/default.nix
+++ b/modules/private/websites/tools/ether/default.nix
@@ -15,19 +15,16 @@ in {
15 services.duplyBackup.profiles.etherpad-lite = { 15 services.duplyBackup.profiles.etherpad-lite = {
16 rootDir = "/var/lib/private/etherpad-lite"; 16 rootDir = "/var/lib/private/etherpad-lite";
17 }; 17 };
18 secrets.keys = [ 18 secrets.keys = {
19 { 19 "webapps/tools-etherpad-apikey" = {
20 dest = "webapps/tools-etherpad-apikey";
21 permissions = "0400"; 20 permissions = "0400";
22 text = env.api_key; 21 text = env.api_key;
23 } 22 };
24 { 23 "webapps/tools-etherpad-sessionkey" = {
25 dest = "webapps/tools-etherpad-sessionkey";
26 permissions = "0400"; 24 permissions = "0400";
27 text = env.session_key; 25 text = env.session_key;
28 } 26 };
29 { 27 "webapps/tools-etherpad" = {
30 dest = "webapps/tools-etherpad";
31 permissions = "0400"; 28 permissions = "0400";
32 text = '' 29 text = ''
33 { 30 {
@@ -152,8 +149,8 @@ in {
152 "logconfig" : { "appenders": [ { "type": "console" } ] } 149 "logconfig" : { "appenders": [ { "type": "console" } ] }
153 } 150 }
154 ''; 151 '';
155 } 152 };
156 ]; 153 };
157 services.etherpad-lite = { 154 services.etherpad-lite = {
158 enable = true; 155 enable = true;
159 package = pkgs.webapps.etherpad-lite.withModules (p: [ 156 package = pkgs.webapps.etherpad-lite.withModules (p: [
diff --git a/modules/private/websites/tools/git/mantisbt.nix b/modules/private/websites/tools/git/mantisbt.nix
index e6a8da7..033a651 100644
--- a/modules/private/websites/tools/git/mantisbt.nix
+++ b/modules/private/websites/tools/git/mantisbt.nix
@@ -6,8 +6,7 @@ rec {
6 install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/mantisbt 6 install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/mantisbt
7 ''; 7 '';
8 }; 8 };
9 keys = [{ 9 keys."webapps/tools-mantisbt" = {
10 dest = "webapps/tools-mantisbt";
11 user = apache.user; 10 user = apache.user;
12 group = apache.group; 11 group = apache.group;
13 permissions = "0400"; 12 permissions = "0400";
@@ -45,7 +44,7 @@ rec {
45 $g_ldap_realname_field = 'cn'; 44 $g_ldap_realname_field = 'cn';
46 $g_ldap_organization = '${env.ldap.filter}'; 45 $g_ldap_organization = '${env.ldap.filter}';
47 ''; 46 '';
48 }]; 47 };
49 webRoot = (mantisbt_2.override { mantis_config = config.secrets.fullPaths."webapps/tools-mantisbt"; }).withPlugins (p: [p.slack p.source-integration]); 48 webRoot = (mantisbt_2.override { mantis_config = config.secrets.fullPaths."webapps/tools-mantisbt"; }).withPlugins (p: [p.slack p.source-integration]);
50 apache = rec { 49 apache = rec {
51 user = "wwwrun"; 50 user = "wwwrun";
diff --git a/modules/private/websites/tools/mail/roundcubemail.nix b/modules/private/websites/tools/mail/roundcubemail.nix
index 7d8e733..92de28e 100644
--- a/modules/private/websites/tools/mail/roundcubemail.nix
+++ b/modules/private/websites/tools/mail/roundcubemail.nix
@@ -9,8 +9,7 @@ rec {
9 install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions 9 install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions
10 ''; 10 '';
11 }; 11 };
12 keys = [{ 12 keys."webapps/tools-roundcube" = {
13 dest = "webapps/tools-roundcube";
14 user = apache.user; 13 user = apache.user;
15 group = apache.group; 14 group = apache.group;
16 permissions = "0400"; 15 permissions = "0400";
@@ -74,7 +73,7 @@ rec {
74 $config['temp_dir'] = '${varDir}/cache'; 73 $config['temp_dir'] = '${varDir}/cache';
75 $config['mime_types'] = '${apacheHttpd}/conf/mime.types'; 74 $config['mime_types'] = '${apacheHttpd}/conf/mime.types';
76 ''; 75 '';
77 }]; 76 };
78 webRoot = (roundcubemail.override { roundcube_config = config.secrets.fullPaths."webapps/tools-roundcube"; }).withPlugins (p: [ p.automatic_addressbook p.carddav p.contextmenu p.contextmenu_folder p.html5_notifier p.ident_switch p.message_highlight p.thunderbird_labels ]); 77 webRoot = (roundcubemail.override { roundcube_config = config.secrets.fullPaths."webapps/tools-roundcube"; }).withPlugins (p: [ p.automatic_addressbook p.carddav p.contextmenu p.contextmenu_folder p.html5_notifier p.ident_switch p.message_highlight p.thunderbird_labels ]);
79 apache = rec { 78 apache = rec {
80 user = "wwwrun"; 79 user = "wwwrun";
diff --git a/modules/private/websites/tools/mastodon/default.nix b/modules/private/websites/tools/mastodon/default.nix
index cea8710..87e8d72 100644
--- a/modules/private/websites/tools/mastodon/default.nix
+++ b/modules/private/websites/tools/mastodon/default.nix
@@ -13,8 +13,7 @@ in {
13 services.duplyBackup.profiles.mastodon = { 13 services.duplyBackup.profiles.mastodon = {
14 rootDir = mcfg.dataDir; 14 rootDir = mcfg.dataDir;
15 }; 15 };
16 secrets.keys = [{ 16 secrets.keys."webapps/tools-mastodon" = {
17 dest = "webapps/tools-mastodon";
18 user = "mastodon"; 17 user = "mastodon";
19 group = "mastodon"; 18 group = "mastodon";
20 permissions = "0400"; 19 permissions = "0400";
@@ -59,7 +58,7 @@ in {
59 LDAP_UID="uid" 58 LDAP_UID="uid"
60 LDAP_SEARCH_FILTER="${env.ldap.filter}" 59 LDAP_SEARCH_FILTER="${env.ldap.filter}"
61 ''; 60 '';
62 }]; 61 };
63 services.mastodon = { 62 services.mastodon = {
64 enable = true; 63 enable = true;
65 configFile = config.secrets.fullPaths."webapps/tools-mastodon"; 64 configFile = config.secrets.fullPaths."webapps/tools-mastodon";
diff --git a/modules/private/websites/tools/mgoblin/default.nix b/modules/private/websites/tools/mgoblin/default.nix
index 6d6a5a4..f6cba4a 100644
--- a/modules/private/websites/tools/mgoblin/default.nix
+++ b/modules/private/websites/tools/mgoblin/default.nix
@@ -12,8 +12,7 @@ in {
12 services.duplyBackup.profiles.mgoblin = { 12 services.duplyBackup.profiles.mgoblin = {
13 rootDir = mcfg.dataDir; 13 rootDir = mcfg.dataDir;
14 }; 14 };
15 secrets.keys = [{ 15 secrets.keys."webapps/tools-mediagoblin" = {
16 dest = "webapps/tools-mediagoblin";
17 user = "mediagoblin"; 16 user = "mediagoblin";
18 group = "mediagoblin"; 17 group = "mediagoblin";
19 permissions = "0400"; 18 permissions = "0400";
@@ -77,7 +76,7 @@ in {
77 [[mediagoblin.media_types.image]] 76 [[mediagoblin.media_types.image]]
78 [[mediagoblin.media_types.video]] 77 [[mediagoblin.media_types.video]]
79 ''; 78 '';
80 }]; 79 };
81 80
82 users.users.mediagoblin.extraGroups = [ "keys" ]; 81 users.users.mediagoblin.extraGroups = [ "keys" ];
83 82
diff --git a/modules/private/websites/tools/peertube/default.nix b/modules/private/websites/tools/peertube/default.nix
index 7dcc998..daeeb1f 100644
--- a/modules/private/websites/tools/peertube/default.nix
+++ b/modules/private/websites/tools/peertube/default.nix
@@ -18,8 +18,7 @@ in {
18 }; 18 };
19 users.users.peertube.extraGroups = [ "keys" ]; 19 users.users.peertube.extraGroups = [ "keys" ];
20 20
21 secrets.keys = [{ 21 secrets.keys."webapps/tools-peertube" = {
22 dest = "webapps/tools-peertube";
23 user = "peertube"; 22 user = "peertube";
24 group = "peertube"; 23 group = "peertube";
25 permissions = "0640"; 24 permissions = "0640";
@@ -62,7 +61,7 @@ in {
62 plugins: '${pcfg.dataDir}/storage/plugins/' 61 plugins: '${pcfg.dataDir}/storage/plugins/'
63 client_overrides: '${pcfg.dataDir}/storage/client-overrides/' 62 client_overrides: '${pcfg.dataDir}/storage/client-overrides/'
64 ''; 63 '';
65 }]; 64 };
66 65
67 services.websites.env.tools.modules = [ 66 services.websites.env.tools.modules = [
68 "headers" "proxy" "proxy_http" "proxy_wstunnel" 67 "headers" "proxy" "proxy_http" "proxy_wstunnel"
diff --git a/modules/private/websites/tools/performance/default.nix b/modules/private/websites/tools/performance/default.nix
index 5afd639..5715ff0 100644
--- a/modules/private/websites/tools/performance/default.nix
+++ b/modules/private/websites/tools/performance/default.nix
@@ -11,9 +11,8 @@ in
11 }; 11 };
12 12
13 config = lib.mkIf cfg.enable { 13 config = lib.mkIf cfg.enable {
14 secrets.keys = [ 14 secrets.keys = {
15 { 15 status_engine_ui = {
16 dest = "status_engine_ui";
17 permissions = "0400"; 16 permissions = "0400";
18 user = "wwwrun"; 17 user = "wwwrun";
19 group = "wwwrun"; 18 group = "wwwrun";
@@ -44,8 +43,8 @@ in
44 display_perfdata: 1 43 display_perfdata: 1
45 perfdata_backend: mysql 44 perfdata_backend: mysql
46 ''; 45 '';
47 } 46 };
48 ]; 47 };
49 48
50 services.websites.env.tools.modules = [ "proxy_fcgi" ]; 49 services.websites.env.tools.modules = [ "proxy_fcgi" ];
51 50
diff --git a/modules/private/websites/tools/stats/default.nix b/modules/private/websites/tools/stats/default.nix
index 5f184bc..71e31a3 100644
--- a/modules/private/websites/tools/stats/default.nix
+++ b/modules/private/websites/tools/stats/default.nix
@@ -6,9 +6,8 @@ in
6{ 6{
7 options.myServices.websites.tools.stats.enable = lib.mkEnableOption "Enable stats site"; 7 options.myServices.websites.tools.stats.enable = lib.mkEnableOption "Enable stats site";
8 config = lib.mkIf cfg.enable { 8 config = lib.mkIf cfg.enable {
9 secrets.keys = [ 9 secrets.keys = {
10 { 10 "uami/env" = {
11 dest = "umami/env";
12 permission = "0400"; 11 permission = "0400";
13 text = '' 12 text = ''
14 PORT=${toString myCfg.listenPort} 13 PORT=${toString myCfg.listenPort}
@@ -16,8 +15,8 @@ in
16 DATABASE_URL=postgresql://${myCfg.postgresql.user}:${myCfg.postgresql.password}@localhost:${myCfg.postgresql.port}/${myCfg.postgresql.database}?sslmode=disable&host=${myCfg.postgresql.socket} 15 DATABASE_URL=postgresql://${myCfg.postgresql.user}:${myCfg.postgresql.password}@localhost:${myCfg.postgresql.port}/${myCfg.postgresql.database}?sslmode=disable&host=${myCfg.postgresql.socket}
17 HASH_SALT=${myCfg.hashSalt} 16 HASH_SALT=${myCfg.hashSalt}
18 ''; 17 '';
19 } 18 };
20 ]; 19 };
21 20
22 services.websites.env.tools.vhostConfs.stats = { 21 services.websites.env.tools.vhostConfs.stats = {
23 certName = "eldiron"; 22 certName = "eldiron";
diff --git a/modules/private/websites/tools/tools/csp_reports.nix b/modules/private/websites/tools/tools/csp_reports.nix
index 4660251..9b3f0cf 100644
--- a/modules/private/websites/tools/tools/csp_reports.nix
+++ b/modules/private/websites/tools/tools/csp_reports.nix
@@ -1,12 +1,11 @@
1{ env }: 1{ env }:
2rec { 2rec {
3 keys = [{ 3 keys."webapps/tools-csp-reports.conf" = {
4 dest = "webapps/tools-csp-reports.conf";
5 user = "wwwrun"; 4 user = "wwwrun";
6 group = "wwwrun"; 5 group = "wwwrun";
7 permissions = "0400"; 6 permissions = "0400";
8 text = with env.postgresql; '' 7 text = with env.postgresql; ''
9 env[CSP_REPORT_URI] = "host=${socket} dbname=${database} user=${user} password=${password}" 8 env[CSP_REPORT_URI] = "host=${socket} dbname=${database} user=${user} password=${password}"
10 ''; 9 '';
11 }]; 10 };
12} 11}
diff --git a/modules/private/websites/tools/tools/default.nix b/modules/private/websites/tools/tools/default.nix
index ada6253..1f499fb 100644
--- a/modules/private/websites/tools/tools/default.nix
+++ b/modules/private/websites/tools/tools/default.nix
@@ -83,14 +83,14 @@ in {
83 config = lib.mkIf cfg.enable { 83 config = lib.mkIf cfg.enable {
84 secrets.keys = 84 secrets.keys =
85 kanboard.keys 85 kanboard.keys
86 ++ ldap.keys 86 // ldap.keys
87 ++ shaarli.keys 87 // shaarli.keys
88 ++ ttrss.keys 88 // ttrss.keys
89 ++ wallabag.keys 89 // wallabag.keys
90 ++ yourls.keys 90 // yourls.keys
91 ++ dmarc-reports.keys 91 // dmarc-reports.keys
92 ++ csp-reports.keys 92 // csp-reports.keys
93 ++ webhooks.keys; 93 // webhooks.keys;
94 94
95 services.duplyBackup.profiles = { 95 services.duplyBackup.profiles = {
96 dokuwiki = dokuwiki.backups; 96 dokuwiki = dokuwiki.backups;
diff --git a/modules/private/websites/tools/tools/dmarc_reports.nix b/modules/private/websites/tools/tools/dmarc_reports.nix
index 5fdf0b6..89da246 100644
--- a/modules/private/websites/tools/tools/dmarc_reports.nix
+++ b/modules/private/websites/tools/tools/dmarc_reports.nix
@@ -1,7 +1,6 @@
1{ env, config }: 1{ env, config }:
2rec { 2rec {
3 keys = [{ 3 keys."webapps/tools-dmarc-reports.php" = {
4 dest = "webapps/tools-dmarc-reports.php";
5 user = "wwwrun"; 4 user = "wwwrun";
6 group = "wwwrun"; 5 group = "wwwrun";
7 permissions = "0400"; 6 permissions = "0400";
@@ -15,7 +14,7 @@ rec {
15 $anonymous_key = "${env.anonymous_key}"; 14 $anonymous_key = "${env.anonymous_key}";
16 ?> 15 ?>
17 ''; 16 '';
18 }]; 17 };
19 webRoot = ./dmarc_reports; 18 webRoot = ./dmarc_reports;
20 apache = rec { 19 apache = rec {
21 user = "wwwrun"; 20 user = "wwwrun";
diff --git a/modules/private/websites/tools/tools/kanboard.nix b/modules/private/websites/tools/tools/kanboard.nix
index 1a70499..b2e7b65 100644
--- a/modules/private/websites/tools/tools/kanboard.nix
+++ b/modules/private/websites/tools/tools/kanboard.nix
@@ -13,8 +13,7 @@ rec {
13 install -TDm644 ${webRoot}/dataold/web.config ${varDir}/data/web.config 13 install -TDm644 ${webRoot}/dataold/web.config ${varDir}/data/web.config
14 ''; 14 '';
15 }; 15 };
16 keys = [{ 16 keys."webapps/tools-kanboard" = {
17 dest = "webapps/tools-kanboard";
18 user = apache.user; 17 user = apache.user;
19 group = apache.group; 18 group = apache.group;
20 permissions = "0400"; 19 permissions = "0400";
@@ -41,7 +40,7 @@ rec {
41 define('LDAP_GROUP_ADMIN_DN', '${env.ldap.admin_dn}'); 40 define('LDAP_GROUP_ADMIN_DN', '${env.ldap.admin_dn}');
42 ?> 41 ?>
43 ''; 42 '';
44 }]; 43 };
45 webRoot = kanboard { kanboard_config = config.secrets.fullPaths."webapps/tools-kanboard"; }; 44 webRoot = kanboard { kanboard_config = config.secrets.fullPaths."webapps/tools-kanboard"; };
46 apache = rec { 45 apache = rec {
47 user = "wwwrun"; 46 user = "wwwrun";
diff --git a/modules/private/websites/tools/tools/ldap.nix b/modules/private/websites/tools/tools/ldap.nix
index cb90edc..14920f4 100644
--- a/modules/private/websites/tools/tools/ldap.nix
+++ b/modules/private/websites/tools/tools/ldap.nix
@@ -6,8 +6,7 @@ rec {
6 install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/phpldapadmin 6 install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/phpldapadmin
7 ''; 7 '';
8 }; 8 };
9 keys = [{ 9 keys."webapps/tools-ldap" = {
10 dest = "webapps/tools-ldap";
11 user = apache.user; 10 user = apache.user;
12 group = apache.group; 11 group = apache.group;
13 permissions = "0400"; 12 permissions = "0400";
@@ -31,7 +30,7 @@ rec {
31 $servers->setValue('login','attr','uid'); 30 $servers->setValue('login','attr','uid');
32 $servers->setValue('login','fallback_dn',true); 31 $servers->setValue('login','fallback_dn',true);
33 ''; 32 '';
34 }]; 33 };
35 webRoot = phpldapadmin.override { config = config.secrets.fullPaths."webapps/tools-ldap"; }; 34 webRoot = phpldapadmin.override { config = config.secrets.fullPaths."webapps/tools-ldap"; };
36 apache = rec { 35 apache = rec {
37 user = "wwwrun"; 36 user = "wwwrun";
diff --git a/modules/private/websites/tools/tools/shaarli.nix b/modules/private/websites/tools/tools/shaarli.nix
index 80c6a89..b7126cc 100644
--- a/modules/private/websites/tools/tools/shaarli.nix
+++ b/modules/private/websites/tools/tools/shaarli.nix
@@ -38,8 +38,7 @@ in rec {
38 </Directory> 38 </Directory>
39 ''; 39 '';
40 }; 40 };
41 keys = [{ 41 keys."webapps/tools-shaarli" = {
42 dest = "webapps/tools-shaarli";
43 user = apache.user; 42 user = apache.user;
44 group = apache.group; 43 group = apache.group;
45 permissions = "0400"; 44 permissions = "0400";
@@ -50,7 +49,7 @@ in rec {
50 SetEnv SHAARLI_LDAP_BASE "${env.ldap.base}" 49 SetEnv SHAARLI_LDAP_BASE "${env.ldap.base}"
51 SetEnv SHAARLI_LDAP_FILTER "${env.ldap.filter}" 50 SetEnv SHAARLI_LDAP_FILTER "${env.ldap.filter}"
52 ''; 51 '';
53 }]; 52 };
54 phpFpm = rec { 53 phpFpm = rec {
55 serviceDeps = [ "openldap.service" ]; 54 serviceDeps = [ "openldap.service" ];
56 basedir = builtins.concatStringsSep ":" [ webRoot varDir ]; 55 basedir = builtins.concatStringsSep ":" [ webRoot varDir ];
diff --git a/modules/private/websites/tools/tools/ttrss.nix b/modules/private/websites/tools/tools/ttrss.nix
index eb1d415..f6abae9 100644
--- a/modules/private/websites/tools/tools/ttrss.nix
+++ b/modules/private/websites/tools/tools/ttrss.nix
@@ -19,8 +19,7 @@ rec {
19 install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions 19 install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions
20 ''; 20 '';
21 }; 21 };
22 keys = [{ 22 keys."webapps/tools-ttrss" = {
23 dest = "webapps/tools-ttrss";
24 user = apache.user; 23 user = apache.user;
25 group = apache.group; 24 group = apache.group;
26 permissions = "0400"; 25 permissions = "0400";
@@ -87,7 +86,7 @@ rec {
87 define('LDAP_AUTH_LOG_ATTEMPTS', FALSE); 86 define('LDAP_AUTH_LOG_ATTEMPTS', FALSE);
88 define('LDAP_AUTH_DEBUG', FALSE); 87 define('LDAP_AUTH_DEBUG', FALSE);
89 ''; 88 '';
90 }]; 89 };
91 webRoot = (ttrss.override { ttrss_config = config.secrets.fullPaths."webapps/tools-ttrss"; }).withPlugins (p: [ 90 webRoot = (ttrss.override { ttrss_config = config.secrets.fullPaths."webapps/tools-ttrss"; }).withPlugins (p: [
92 p.auth_ldap p.ff_instagram p.tumblr_gdpr_ua 91 p.auth_ldap p.ff_instagram p.tumblr_gdpr_ua
93 (p.af_feedmod.override { patched = true; }) 92 (p.af_feedmod.override { patched = true; })
diff --git a/modules/private/websites/tools/tools/wallabag.nix b/modules/private/websites/tools/tools/wallabag.nix
index 1a604c7..b6ad151 100644
--- a/modules/private/websites/tools/tools/wallabag.nix
+++ b/modules/private/websites/tools/tools/wallabag.nix
@@ -5,8 +5,7 @@ rec {
5 remotes = [ "eriomem" "ovh" ]; 5 remotes = [ "eriomem" "ovh" ];
6 }; 6 };
7 varDir = "/var/lib/wallabag"; 7 varDir = "/var/lib/wallabag";
8 keys = [{ 8 keys."webapps/tools-wallabag" = {
9 dest = "webapps/tools-wallabag";
10 user = apache.user; 9 user = apache.user;
11 group = apache.group; 10 group = apache.group;
12 permissions = "0400"; 11 permissions = "0400";
@@ -68,7 +67,7 @@ rec {
68 class: Swift_SendmailTransport 67 class: Swift_SendmailTransport
69 arguments: ['/run/wrappers/bin/sendmail -bs'] 68 arguments: ['/run/wrappers/bin/sendmail -bs']
70 ''; 69 '';
71 }]; 70 };
72 webappDir = wallabag.override { ldap = true; wallabag_config = config.secrets.fullPaths."webapps/tools-wallabag"; }; 71 webappDir = wallabag.override { ldap = true; wallabag_config = config.secrets.fullPaths."webapps/tools-wallabag"; };
73 activationScript = '' 72 activationScript = ''
74 install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} \ 73 install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} \
diff --git a/modules/private/websites/tools/tools/webhooks.nix b/modules/private/websites/tools/tools/webhooks.nix
index 8ffb81b..785e22b 100644
--- a/modules/private/websites/tools/tools/webhooks.nix
+++ b/modules/private/websites/tools/tools/webhooks.nix
@@ -1,16 +1,17 @@
1{ lib, env }: 1{ lib, env }:
2{ 2{
3 keys = lib.attrsets.mapAttrsToList (k: v: { 3 keys = lib.attrsets.mapAttrs' (k: v:
4 dest = "webapps/webhooks/${k}.php"; 4 lib.nameValuePair "webapps/webhooks/${k}.php" {
5 user = "wwwrun"; 5 user = "wwwrun";
6 group = "wwwrun"; 6 group = "wwwrun";
7 permissions = "0400"; 7 permissions = "0400";
8 text = v; 8 text = v;
9 }) env ++ [{ 9 }) env // {
10 dest = "webapps/webhooks"; 10 "webapps/webhooks" = {
11 isDir = true; 11 isDir = true;
12 user = "wwwrun"; 12 user = "wwwrun";
13 group = "wwwrun"; 13 group = "wwwrun";
14 permissions = "0500"; 14 permissions = "0500";
15 }]; 15 };
16 };
16} 17}
diff --git a/modules/private/websites/tools/tools/yourls.nix b/modules/private/websites/tools/tools/yourls.nix
index 0f977f2..01ef548 100644
--- a/modules/private/websites/tools/tools/yourls.nix
+++ b/modules/private/websites/tools/tools/yourls.nix
@@ -6,8 +6,7 @@ rec {
6 install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/yourls 6 install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/yourls
7 ''; 7 '';
8 }; 8 };
9 keys = [{ 9 keys."webapps/tools-yourls" = {
10 dest = "webapps/tools-yourls";
11 user = apache.user; 10 user = apache.user;
12 group = apache.group; 11 group = apache.group;
13 permissions = "0400"; 12 permissions = "0400";
@@ -39,7 +38,7 @@ rec {
39 38
40 define( 'LDAPAUTH_USERCACHE_TYPE', 0); 39 define( 'LDAPAUTH_USERCACHE_TYPE', 0);
41 ''; 40 '';
42 }]; 41 };
43 webRoot = (yourls.override { yourls_config = config.secrets.fullPaths."webapps/tools-yourls"; }).withPlugins (p: [p.ldap]); 42 webRoot = (yourls.override { yourls_config = config.secrets.fullPaths."webapps/tools-yourls"; }).withPlugins (p: [p.ldap]);
44 apache = rec { 43 apache = rec {
45 user = "wwwrun"; 44 user = "wwwrun";