diff options
Diffstat (limited to 'modules/private/websites/capitaines/landing_pages.nix')
-rw-r--r-- | modules/private/websites/capitaines/landing_pages.nix | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/modules/private/websites/capitaines/landing_pages.nix b/modules/private/websites/capitaines/landing_pages.nix index b94a398..edba8b9 100644 --- a/modules/private/websites/capitaines/landing_pages.nix +++ b/modules/private/websites/capitaines/landing_pages.nix | |||
@@ -1,23 +1,21 @@ | |||
1 | { lib, config, ... }: | 1 | { lib, config, ... }: |
2 | let | 2 | let |
3 | cfg = config.myServices.websites.capitaines.landing_pages; | 3 | cfg = config.myServices.websites.capitaines.landing_pages; |
4 | webappdirs = config.services.websites.webappDirsPaths; | ||
5 | certName = "capitaines"; | 4 | certName = "capitaines"; |
6 | domain = "capitaines.fr"; | 5 | domain = "capitaines.fr"; |
7 | in { | 6 | in { |
8 | options.myServices.websites.capitaines.landing_pages.enable = lib.mkEnableOption "enable Capitaines's landing pages"; | 7 | options.myServices.websites.capitaines.landing_pages.enable = lib.mkEnableOption "enable Capitaines's landing pages"; |
9 | 8 | ||
10 | config = lib.mkIf cfg.enable { | 9 | config = lib.mkIf cfg.enable { |
11 | services.websites.webappDirs.capitaines_mastodon = ./mastodon_static; | ||
12 | services.websites.env.production.vhostConfs.capitaines_mastodon = rec { | 10 | services.websites.env.production.vhostConfs.capitaines_mastodon = rec { |
13 | inherit certName; | 11 | inherit certName; |
14 | certMainHost = "mastodon.${domain}"; | 12 | certMainHost = "mastodon.${domain}"; |
15 | hosts = [ certMainHost ]; | 13 | hosts = [ certMainHost ]; |
16 | root = webappdirs.capitaines_mastodon; | 14 | root = ./mastodon_static; |
17 | extraConfig = [ | 15 | extraConfig = [ |
18 | '' | 16 | '' |
19 | ErrorDocument 404 /index.html | 17 | ErrorDocument 404 /index.html |
20 | <Directory ${webappdirs.capitaines_mastodon}> | 18 | <Directory ${./mastodon_static}> |
21 | DirectoryIndex index.html | 19 | DirectoryIndex index.html |
22 | Options Indexes FollowSymLinks MultiViews Includes | 20 | Options Indexes FollowSymLinks MultiViews Includes |
23 | Require all granted | 21 | Require all granted |
@@ -26,16 +24,15 @@ in { | |||
26 | ]; | 24 | ]; |
27 | }; | 25 | }; |
28 | 26 | ||
29 | services.websites.webappDirs.capitaines_discourse = ./discourse_static; | ||
30 | services.websites.env.production.vhostConfs.capitaines_discourse = { | 27 | services.websites.env.production.vhostConfs.capitaines_discourse = { |
31 | inherit certName; | 28 | inherit certName; |
32 | addToCerts = true; | 29 | addToCerts = true; |
33 | hosts = [ "discourse.${domain}" ]; | 30 | hosts = [ "discourse.${domain}" ]; |
34 | root = webappdirs.capitaines_discourse; | 31 | root = ./discourse_static; |
35 | extraConfig = [ | 32 | extraConfig = [ |
36 | '' | 33 | '' |
37 | ErrorDocument 404 /index.html | 34 | ErrorDocument 404 /index.html |
38 | <Directory ${webappdirs.capitaines_discourse}> | 35 | <Directory ${./discourse_static}> |
39 | DirectoryIndex index.html | 36 | DirectoryIndex index.html |
40 | Options Indexes FollowSymLinks MultiViews Includes | 37 | Options Indexes FollowSymLinks MultiViews Includes |
41 | Require all granted | 38 | Require all granted |
@@ -48,9 +45,9 @@ in { | |||
48 | inherit certName; | 45 | inherit certName; |
49 | addToCerts = true; | 46 | addToCerts = true; |
50 | hosts = [ domain ]; | 47 | hosts = [ domain ]; |
51 | root = webappdirs._www; | 48 | root = ../_www; |
52 | extraConfig = [ '' | 49 | extraConfig = [ '' |
53 | <Directory ${webappdirs._www}> | 50 | <Directory ${../_www}> |
54 | DirectoryIndex index.htm | 51 | DirectoryIndex index.htm |
55 | Require all granted | 52 | Require all granted |
56 | </Directory> | 53 | </Directory> |