aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixops/modules/websites/default.nix3
-rw-r--r--nixops/modules/websites/ftp/florian.nix73
2 files changed, 76 insertions, 0 deletions
diff --git a/nixops/modules/websites/default.nix b/nixops/modules/websites/default.nix
index c439b8d..3b3ccc2 100644
--- a/nixops/modules/websites/default.nix
+++ b/nixops/modules/websites/default.nix
@@ -93,6 +93,7 @@ in
93 ./tellesflorian 93 ./tellesflorian
94 ./ftp/jerome.nix 94 ./ftp/jerome.nix
95 ./ftp/nassime.nix 95 ./ftp/nassime.nix
96 ./ftp/florian.nix
96 ./tools/db 97 ./tools/db
97 ./tools/tools 98 ./tools/tools
98 ./tools/dav 99 ./tools/dav
@@ -191,6 +192,7 @@ in
191 services.myWebsites.Connexionswing.production.enable = cfg.production.enable; 192 services.myWebsites.Connexionswing.production.enable = cfg.production.enable;
192 services.myWebsites.Jerome.production.enable = cfg.production.enable; 193 services.myWebsites.Jerome.production.enable = cfg.production.enable;
193 services.myWebsites.Nassime.production.enable = cfg.production.enable; 194 services.myWebsites.Nassime.production.enable = cfg.production.enable;
195 services.myWebsites.Florian.production.enable = cfg.production.enable;
194 196
195 services.myWebsites.Chloe.integration.enable = cfg.integration.enable; 197 services.myWebsites.Chloe.integration.enable = cfg.integration.enable;
196 services.myWebsites.Ludivine.integration.enable = cfg.integration.enable; 198 services.myWebsites.Ludivine.integration.enable = cfg.integration.enable;
@@ -198,6 +200,7 @@ in
198 services.myWebsites.PiedsJaloux.integration.enable = cfg.integration.enable; 200 services.myWebsites.PiedsJaloux.integration.enable = cfg.integration.enable;
199 services.myWebsites.Connexionswing.integration.enable = cfg.integration.enable; 201 services.myWebsites.Connexionswing.integration.enable = cfg.integration.enable;
200 services.myWebsites.TellesFlorian.integration.enable = true; 202 services.myWebsites.TellesFlorian.integration.enable = true;
203 services.myWebsites.Florian.integration.enable = true;
201 204
202 services.myWebsites.apacheConfig = { 205 services.myWebsites.apacheConfig = {
203 gzip = { 206 gzip = {
diff --git a/nixops/modules/websites/ftp/florian.nix b/nixops/modules/websites/ftp/florian.nix
new file mode 100644
index 0000000..9688700
--- /dev/null
+++ b/nixops/modules/websites/ftp/florian.nix
@@ -0,0 +1,73 @@
1{ lib, pkgs, config, myconfig, mylibs, ... }:
2let
3 adminer = pkgs.callPackage ../commons/adminer.nix {};
4 cfg = config.services.myWebsites.Florian;
5 varDir = "/var/lib/ftp/florian";
6 env = myconfig.env.websites.florian;
7in {
8 options.services.myWebsites.Florian = {
9 production = {
10 enable = lib.mkEnableOption "enable Florian's website production";
11 };
12 integration = {
13 enable = lib.mkEnableOption "enable Florian's website integration";
14 };
15 };
16
17 config = lib.mkMerge [
18 (lib.mkIf cfg.production.enable {
19 security.acme.certs."ftp".extraDomains."tellesflorian.com" = null;
20 security.acme.certs."florian" = config.services.myCertificates.certConfig // {
21 domain = "tellesflorian.com";
22 extraDomains = {
23 "www.tellesflorian.com" = null;
24 };
25 };
26
27 services.myWebsites.production.modules = adminer.apache.modules;
28 services.myWebsites.production.vhostConfs.florian = {
29 certName = "florian";
30 hosts = [ "tellesflorian.com" "www.tellesflorian.com" ];
31 root = "${varDir}/tellesflorian.com";
32 extraConfig = [
33 adminer.apache.vhostConf
34 ''
35 ServerAdmin ${env.server_admin}
36
37 <Directory ${varDir}/tellesflorian.com>
38 DirectoryIndex index.php index.htm index.html
39 Options Indexes FollowSymLinks MultiViews Includes
40 AllowOverride None
41 Require all granted
42 </Directory>
43 ''
44 ];
45 };
46 })
47
48 (lib.mkIf cfg.integration.enable {
49 security.acme.certs."ftp".extraDomains."florian.immae.eu" = null;
50 security.acme.certs."eldiron".extraDomains."florian.immae.eu" = null;
51
52 services.myWebsites.integration.modules = adminer.apache.modules;
53 services.myWebsites.integration.vhostConfs.florian = {
54 certName = "eldiron";
55 hosts = [ "florian.immae.eu" ];
56 root = "${varDir}/florian.immae.eu";
57 extraConfig = [
58 adminer.apache.vhostConf
59 ''
60 ServerAdmin ${env.server_admin}
61
62 <Directory ${varDir}/florian.immae.eu>
63 DirectoryIndex index.php index.htm index.html
64 Options Indexes FollowSymLinks MultiViews Includes
65 AllowOverride None
66 Require all granted
67 </Directory>
68 ''
69 ];
70 };
71 })
72 ];
73}