]>
Commit | Line | Data |
---|---|---|
d3452fc5 IB |
1 | { lib, config, ... }: |
2 | let | |
3 | cfg = config.myServices.websites.capitaines.landing_pages; | |
d3452fc5 IB |
4 | certName = "capitaines"; |
5 | domain = "capitaines.fr"; | |
6 | in { | |
7 | options.myServices.websites.capitaines.landing_pages.enable = lib.mkEnableOption "enable Capitaines's landing pages"; | |
8 | ||
9 | config = lib.mkIf cfg.enable { | |
d3452fc5 IB |
10 | services.websites.env.production.vhostConfs.capitaines_mastodon = rec { |
11 | inherit certName; | |
12 | certMainHost = "mastodon.${domain}"; | |
13 | hosts = [ certMainHost ]; | |
750fe5a4 | 14 | root = ./mastodon_static; |
d3452fc5 IB |
15 | extraConfig = [ |
16 | '' | |
17 | ErrorDocument 404 /index.html | |
750fe5a4 | 18 | <Directory ${./mastodon_static}> |
d3452fc5 IB |
19 | DirectoryIndex index.html |
20 | Options Indexes FollowSymLinks MultiViews Includes | |
21 | Require all granted | |
22 | </Directory> | |
23 | '' | |
24 | ]; | |
25 | }; | |
26 | ||
d3452fc5 IB |
27 | services.websites.env.production.vhostConfs.capitaines_discourse = { |
28 | inherit certName; | |
29 | addToCerts = true; | |
30 | hosts = [ "discourse.${domain}" ]; | |
750fe5a4 | 31 | root = ./discourse_static; |
d3452fc5 IB |
32 | extraConfig = [ |
33 | '' | |
34 | ErrorDocument 404 /index.html | |
750fe5a4 | 35 | <Directory ${./discourse_static}> |
d3452fc5 IB |
36 | DirectoryIndex index.html |
37 | Options Indexes FollowSymLinks MultiViews Includes | |
38 | Require all granted | |
39 | </Directory> | |
40 | '' | |
41 | ]; | |
42 | }; | |
43 | ||
44 | services.websites.env.production.vhostConfs.capitaines = { | |
45 | inherit certName; | |
46 | addToCerts = true; | |
47 | hosts = [ domain ]; | |
750fe5a4 | 48 | root = ../_www; |
d3452fc5 | 49 | extraConfig = [ '' |
750fe5a4 | 50 | <Directory ${../_www}> |
d3452fc5 IB |
51 | DirectoryIndex index.htm |
52 | Require all granted | |
53 | </Directory> | |
54 | '' ]; | |
55 | }; | |
56 | }; | |
57 | } |