aboutsummaryrefslogtreecommitdiff
path: root/modules/private
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-24 13:59:54 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-24 13:59:54 +0100
commit829ef7f1cb79f0171f9c5254278d93c48c44a7b5 (patch)
treebf3d387409046dd0a5bb100b08e1c5eefb27344f /modules/private
parent9a414bd66ff06cade504ac34f13dbeddac48150a (diff)
downloadNix-829ef7f1cb79f0171f9c5254278d93c48c44a7b5.tar.gz
Nix-829ef7f1cb79f0171f9c5254278d93c48c44a7b5.tar.zst
Nix-829ef7f1cb79f0171f9c5254278d93c48c44a7b5.zip
Add iridologie website
Diffstat (limited to 'modules/private')
-rw-r--r--modules/private/default.nix5
-rw-r--r--modules/private/environment.nix8
-rw-r--r--modules/private/websites/default.nix5
-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.nix31
6 files changed, 47 insertions, 14 deletions
diff --git a/modules/private/default.nix b/modules/private/default.nix
index be39993..30b9df6 100644
--- a/modules/private/default.nix
+++ b/modules/private/default.nix
@@ -16,8 +16,9 @@ set = {
16 openldapReplication = ./databases/openldap_replication.nix; 16 openldapReplication = ./databases/openldap_replication.nix;
17 17
18 websites = ./websites; 18 websites = ./websites;
19 atenInte = ./websites/aten/integration.nix; 19 isabelleAtenInte = ./websites/isabelle/aten_integration.nix;
20 atenProd = ./websites/aten/production.nix; 20 isabelleAtenProd = ./websites/isabelle/aten_production.nix;
21 isabelleIridologie = ./websites/isabelle/iridologie.nix;
21 capitainesProd = ./websites/capitaines/production.nix; 22 capitainesProd = ./websites/capitaines/production.nix;
22 chloeInte = ./websites/chloe/integration.nix; 23 chloeInte = ./websites/chloe/integration.nix;
23 chloeProd = ./websites/chloe/production.nix; 24 chloeProd = ./websites/chloe/production.nix;
diff --git a/modules/private/environment.nix b/modules/private/environment.nix
index f0e39e9..15e8f54 100644
--- a/modules/private/environment.nix
+++ b/modules/private/environment.nix
@@ -951,8 +951,8 @@ in
951 description = "Websites configurations"; 951 description = "Websites configurations";
952 type = submodule { 952 type = submodule {
953 options = { 953 options = {
954 aten = mkOption { 954 isabelle = mkOption {
955 description = "Aten configurations by environment"; 955 description = "Isabelle configurations by environment";
956 type = 956 type =
957 let 957 let
958 atenSubmodule = mkOption { 958 atenSubmodule = mkOption {
@@ -968,8 +968,8 @@ in
968 in 968 in
969 submodule { 969 submodule {
970 options = { 970 options = {
971 production = atenSubmodule; 971 aten_production = atenSubmodule;
972 integration = atenSubmodule; 972 aten_integration = atenSubmodule;
973 }; 973 };
974 }; 974 };
975 }; 975 };
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, ... }:
2let 2let
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;
7in { 7in {
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, ... }:
2let 2let
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;
7in { 7in {
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, ... }:
2let
3 cfg = config.myServices.websites.isabelle.iridologie;
4 varDir = "/var/lib/ftp/isabelle";
5in {
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