diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-16 17:40:07 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-16 20:20:45 +0200 |
commit | 4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0 (patch) | |
tree | 9a7ede9ac3f1899074e9ef568a447f883191d3b5 /modules/private/websites/isabelle | |
parent | da30ae4ffdd153a1eb32fb86f9ca9a65aa19e4e2 (diff) | |
download | Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.gz Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.zst Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.zip |
Use attrs for secrets instead of lists
Diffstat (limited to 'modules/private/websites/isabelle')
-rw-r--r-- | modules/private/websites/isabelle/aten_integration.nix | 5 | ||||
-rw-r--r-- | modules/private/websites/isabelle/aten_production.nix | 5 | ||||
-rw-r--r-- | modules/private/websites/isabelle/iridologie.nix | 43 |
3 files changed, 24 insertions, 29 deletions
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" ]; |