diff options
Diffstat (limited to 'modules/private/websites/aten/integration.nix')
-rw-r--r-- | modules/private/websites/aten/integration.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/private/websites/aten/integration.nix b/modules/private/websites/aten/integration.nix index 7aadf58..7e12b38 100644 --- a/modules/private/websites/aten/integration.nix +++ b/modules/private/websites/aten/integration.nix | |||
@@ -1,6 +1,6 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | secrets = myconfig.env.websites.aten.integration; | 3 | secrets = config.myEnv.websites.aten.integration; |
4 | app = pkgs.webapps.aten.override { environment = secrets.environment; }; | 4 | app = pkgs.webapps.aten.override { environment = secrets.environment; }; |
5 | cfg = config.myServices.websites.aten.integration; | 5 | cfg = config.myServices.websites.aten.integration; |
6 | pcfg = config.services.phpApplication; | 6 | pcfg = config.services.phpApplication; |
@@ -39,10 +39,15 @@ in { | |||
39 | user = config.services.httpd.Inte.user; | 39 | user = config.services.httpd.Inte.user; |
40 | group = config.services.httpd.Inte.group; | 40 | group = config.services.httpd.Inte.group; |
41 | permissions = "0400"; | 41 | permissions = "0400"; |
42 | text = '' | 42 | text = let |
43 | # cf: | ||
44 | # https://secure.php.net/manual/fr/function.parse-url.php | ||
45 | # vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php#parseDatabaseUrlQuery | ||
46 | psql_url = with secrets.postgresql; "pdo-pgsql://${user}:${password}@invalid:${port}/${database}?host=${socket}"; | ||
47 | in '' | ||
43 | SetEnv APP_ENV "${app.environment}" | 48 | SetEnv APP_ENV "${app.environment}" |
44 | SetEnv APP_SECRET "${secrets.secret}" | 49 | SetEnv APP_SECRET "${secrets.secret}" |
45 | SetEnv DATABASE_URL "${secrets.psql_url}" | 50 | SetEnv DATABASE_URL "${psql_url}" |
46 | ''; | 51 | ''; |
47 | }]; | 52 | }]; |
48 | services.websites.env.integration.vhostConfs.aten_dev = { | 53 | services.websites.env.integration.vhostConfs.aten_dev = { |