diff options
Diffstat (limited to 'modules/private/websites')
-rw-r--r-- | modules/private/websites/default.nix | 5 | ||||
-rw-r--r-- | modules/private/websites/isabelle/aten_integration.nix (renamed from modules/private/websites/aten/integration.nix) | 6 | ||||
-rw-r--r-- | modules/private/websites/isabelle/aten_production.nix (renamed from modules/private/websites/aten/production.nix) | 6 | ||||
-rw-r--r-- | modules/private/websites/isabelle/iridologie.nix | 31 |
4 files changed, 40 insertions, 8 deletions
diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix index dcbbef8..7f3e463 100644 --- a/modules/private/websites/default.nix +++ b/modules/private/websites/default.nix | |||
@@ -224,8 +224,9 @@ in | |||
224 | _theme = pkgs.webapps.apache-theme.theme; | 224 | _theme = pkgs.webapps.apache-theme.theme; |
225 | }; | 225 | }; |
226 | 226 | ||
227 | aten.integration.enable = true; | 227 | isabelle.aten_integration.enable = true; |
228 | aten.production.enable = true; | 228 | isabelle.aten_production.enable = true; |
229 | isabelle.iridologie.enable = true; | ||
229 | 230 | ||
230 | capitaines.production.enable = true; | 231 | capitaines.production.enable = true; |
231 | 232 | ||
diff --git a/modules/private/websites/aten/integration.nix b/modules/private/websites/isabelle/aten_integration.nix index 7e12b38..c8ca03f 100644 --- a/modules/private/websites/aten/integration.nix +++ b/modules/private/websites/isabelle/aten_integration.nix | |||
@@ -1,11 +1,11 @@ | |||
1 | { lib, pkgs, config, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | secrets = config.myEnv.websites.aten.integration; | 3 | secrets = config.myEnv.websites.isabelle.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.isabelle.aten_integration; |
6 | pcfg = config.services.phpApplication; | 6 | pcfg = config.services.phpApplication; |
7 | in { | 7 | in { |
8 | options.myServices.websites.aten.integration.enable = lib.mkEnableOption "enable Aten's website in integration"; | 8 | options.myServices.websites.isabelle.aten_integration.enable = lib.mkEnableOption "enable Aten's website in integration"; |
9 | 9 | ||
10 | config = lib.mkIf cfg.enable { | 10 | config = lib.mkIf cfg.enable { |
11 | services.duplyBackup.profiles.aten_dev.rootDir = app.varDir; | 11 | services.duplyBackup.profiles.aten_dev.rootDir = app.varDir; |
diff --git a/modules/private/websites/aten/production.nix b/modules/private/websites/isabelle/aten_production.nix index 1f72e61..8e33f0f 100644 --- a/modules/private/websites/aten/production.nix +++ b/modules/private/websites/isabelle/aten_production.nix | |||
@@ -1,11 +1,11 @@ | |||
1 | { lib, pkgs, config, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | secrets = config.myEnv.websites.aten.production; | 3 | secrets = config.myEnv.websites.isabelle.aten_production; |
4 | app = pkgs.webapps.aten.override { environment = secrets.environment; }; | 4 | app = pkgs.webapps.aten.override { environment = secrets.environment; }; |
5 | cfg = config.myServices.websites.aten.production; | 5 | cfg = config.myServices.websites.isabelle.aten_production; |
6 | pcfg = config.services.phpApplication; | 6 | pcfg = config.services.phpApplication; |
7 | in { | 7 | in { |
8 | options.myServices.websites.aten.production.enable = lib.mkEnableOption "enable Aten's website in production"; | 8 | options.myServices.websites.isabelle.aten_production.enable = lib.mkEnableOption "enable Aten's website in production"; |
9 | 9 | ||
10 | config = lib.mkIf cfg.enable { | 10 | config = lib.mkIf cfg.enable { |
11 | services.duplyBackup.profiles.aten_prod.rootDir = app.varDir; | 11 | services.duplyBackup.profiles.aten_prod.rootDir = app.varDir; |
diff --git a/modules/private/websites/isabelle/iridologie.nix b/modules/private/websites/isabelle/iridologie.nix new file mode 100644 index 0000000..88f8b03 --- /dev/null +++ b/modules/private/websites/isabelle/iridologie.nix | |||
@@ -0,0 +1,31 @@ | |||
1 | { lib, config, ... }: | ||
2 | let | ||
3 | cfg = config.myServices.websites.isabelle.iridologie; | ||
4 | varDir = "/var/lib/ftp/isabelle"; | ||
5 | in { | ||
6 | options.myServices.websites.isabelle.iridologie.enable = lib.mkEnableOption "enable Iridologie's website"; | ||
7 | |||
8 | config = lib.mkIf cfg.enable { | ||
9 | services.webstats.sites = [ { name = "iridologie.icommandeur.org"; } ]; | ||
10 | services.websites.env.production.vhostConfs.iridologie = { | ||
11 | certName = "aten"; | ||
12 | hosts = [ "icommandeur.org" "www.icommandeur.org" "iridologie.icommandeur.org" ]; | ||
13 | root = varDir; | ||
14 | extraConfig = [ | ||
15 | '' | ||
16 | Use Stats iridologie.icommandeur.org | ||
17 | RewriteEngine On | ||
18 | RewriteCond "%{HTTP_HOST}" "!^iridologie\.icommandeur\.org$" [NC] | ||
19 | RewriteRule ^(.+)$ https://iridologie.icommandeur.org$1 [R=302,L] | ||
20 | |||
21 | <Directory ${varDir}> | ||
22 | DirectoryIndex index.html | ||
23 | AllowOverride None | ||
24 | Require all granted | ||
25 | </Directory> | ||
26 | '' | ||
27 | ]; | ||
28 | }; | ||
29 | }; | ||
30 | } | ||
31 | |||