]>
Commit | Line | Data |
---|---|---|
10bd8c08 IB |
1 | { lib, pkgs, config, myconfig, mylibs, ... }: |
2 | let | |
3 | cfg = config.services.myWebsites.Capitaines; | |
4 | env = myconfig.env.websites.capitaines; | |
5 | siteDir = ./mastodon_static; | |
6 | in { | |
7 | options.services.myWebsites.Capitaines = { | |
8 | production = { | |
9 | enable = lib.mkEnableOption "enable Capitaines's website"; | |
10 | }; | |
11 | }; | |
12 | ||
13 | config = lib.mkIf cfg.production.enable { | |
14 | security.acme.certs."capitaines_mastodon" = config.services.myCertificates.certConfig // { | |
15 | domain = "mastodon.capitaines.fr"; | |
16 | }; | |
17 | ||
18 | services.myWebsites.production.vhostConfs.capitaines = { | |
19 | certName = "capitaines_mastodon"; | |
20 | hosts = [ "mastodon.capitaines.fr" ]; | |
21 | root = siteDir; | |
22 | extraConfig = [ | |
23 | '' | |
24 | ErrorDocument 404 /index.html | |
25 | <Directory ${siteDir}> | |
26 | DirectoryIndex index.html | |
27 | Options Indexes FollowSymLinks MultiViews Includes | |
28 | Require all granted | |
29 | </Directory> | |
30 | '' | |
31 | ]; | |
32 | }; | |
33 | }; | |
34 | } |