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