diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-22 20:10:54 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-23 01:44:51 +0200 |
commit | 41cce84a02652e22ad967c9f31669092eb3e7f0e (patch) | |
tree | b546e5a7524a00cd353b0d0e82e4dff038166dc1 /modules/private/websites/ludivine | |
parent | 750fe5a43b957b91a26069cf8a4fe19fc7b2633c (diff) | |
download | Nix-41cce84a02652e22ad967c9f31669092eb3e7f0e.tar.gz Nix-41cce84a02652e22ad967c9f31669092eb3e7f0e.tar.zst Nix-41cce84a02652e22ad967c9f31669092eb3e7f0e.zip |
Move devtools to other place
Diffstat (limited to 'modules/private/websites/ludivine')
-rw-r--r-- | modules/private/websites/ludivine/integration.nix | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/modules/private/websites/ludivine/integration.nix b/modules/private/websites/ludivine/integration.nix index 99c9acf..d04295d 100644 --- a/modules/private/websites/ludivine/integration.nix +++ b/modules/private/websites/ludivine/integration.nix | |||
@@ -1,14 +1,9 @@ | |||
1 | { lib, pkgs, config, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | secrets = config.myEnv.websites.ludivine.integration; | 3 | secrets = config.myEnv.websites.ludivine.integration; |
4 | app = pkgs.callPackage ./app { | ||
5 | composerEnv = pkgs.composerEnv.override { php = pkgs.php72; }; | ||
6 | environment = secrets.environment; | ||
7 | varDir = "/var/lib/ludivine_integration"; | ||
8 | secretsPath = config.secrets.fullPaths."websites/ludivine/integration"; | ||
9 | }; | ||
10 | cfg = config.myServices.websites.ludivine.integration; | 4 | cfg = config.myServices.websites.ludivine.integration; |
11 | pcfg = config.services.phpApplication; | 5 | pcfg = config.services.phpApplication; |
6 | webRoot = "/var/lib/ftp/immae/ludivine/web"; | ||
12 | in { | 7 | in { |
13 | options.myServices.websites.ludivine.integration.enable = lib.mkEnableOption "enable Ludivine's website in integration"; | 8 | options.myServices.websites.ludivine.integration.enable = lib.mkEnableOption "enable Ludivine's website in integration"; |
14 | 9 | ||
@@ -18,14 +13,15 @@ in { | |||
18 | websiteEnv = "integration"; | 13 | websiteEnv = "integration"; |
19 | httpdUser = config.services.httpd.Inte.user; | 14 | httpdUser = config.services.httpd.Inte.user; |
20 | httpdGroup = config.services.httpd.Inte.group; | 15 | httpdGroup = config.services.httpd.Inte.group; |
21 | inherit (app) webRoot varDir; | 16 | inherit webRoot; |
17 | varDir = "/var/lib/ftp/immae/ludivine_var"; | ||
18 | app = "/var/lib/ftp/immae/ludivine"; | ||
22 | varDirPaths = { | 19 | varDirPaths = { |
23 | "tmp" = "0700"; | 20 | "tmp" = "0700"; |
24 | }; | 21 | }; |
25 | inherit app; | ||
26 | serviceDeps = [ "mysql.service" ]; | 22 | serviceDeps = [ "mysql.service" ]; |
27 | preStartActions = [ | 23 | preStartActions = [ |
28 | "./bin/console --env=${app.environment} cache:clear --no-warmup" | 24 | "./bin/console --env=dev cache:clear --no-warmup" |
29 | ]; | 25 | ]; |
30 | phpOpenbasedir = [ "/tmp" ]; | 26 | phpOpenbasedir = [ "/tmp" ]; |
31 | phpPool = { | 27 | phpPool = { |
@@ -90,7 +86,7 @@ in { | |||
90 | certName = "integration"; | 86 | certName = "integration"; |
91 | addToCerts = true; | 87 | addToCerts = true; |
92 | hosts = [ "ludivine.immae.eu" ]; | 88 | hosts = [ "ludivine.immae.eu" ]; |
93 | root = app.webRoot; | 89 | root = webRoot; |
94 | extraConfig = [ | 90 | extraConfig = [ |
95 | '' | 91 | '' |
96 | <FilesMatch "\.php$"> | 92 | <FilesMatch "\.php$"> |
@@ -103,7 +99,7 @@ in { | |||
103 | ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://ludivinecassal.com\"></html>" | 99 | ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://ludivinecassal.com\"></html>" |
104 | </Location> | 100 | </Location> |
105 | 101 | ||
106 | <Directory ${app.webRoot}> | 102 | <Directory ${webRoot}> |
107 | Options Indexes FollowSymLinks MultiViews Includes | 103 | Options Indexes FollowSymLinks MultiViews Includes |
108 | AllowOverride None | 104 | AllowOverride None |
109 | Require all granted | 105 | Require all granted |