]>
Commit | Line | Data |
---|---|---|
8b2f048b | 1 | { lib, config, ... }: |
9a414bd6 IB |
2 | let |
3 | cfg = config.myServices.websites.papa.maison_bbc; | |
8b2f048b | 4 | webappdirs = config.services.websites.webappDirsPaths; |
9a414bd6 IB |
5 | in { |
6 | options.myServices.websites.papa.maison_bbc.enable = lib.mkEnableOption "enable Papa Maison bbc website"; | |
7 | ||
8 | config = lib.mkIf cfg.enable { | |
9a414bd6 | 9 | services.webstats.sites = [ { name = "maison.bbc.bouya.org"; } ]; |
9a414bd6 | 10 | |
8b2f048b | 11 | services.websites.webappDirs.papa_maison_bbc = ./maison_bbc_static; |
9a414bd6 IB |
12 | services.websites.env.production.vhostConfs.papa_maison_bbc = { |
13 | certName = "papa"; | |
14 | addToCerts = true; | |
15 | hosts = [ "maison.bbc.bouya.org" ]; | |
8b2f048b | 16 | root = webappdirs.papa_maison_bbc; |
9a414bd6 IB |
17 | extraConfig = [ |
18 | '' | |
8b2f048b IB |
19 | ErrorDocument 404 /index.html |
20 | <Directory ${webappdirs.papa_maison_bbc}> | |
21 | DirectoryIndex index.htm index.html | |
9a414bd6 IB |
22 | AllowOverride None |
23 | Require all granted | |
9a414bd6 IB |
24 | </Directory> |
25 | '' | |
26 | ]; | |
27 | }; | |
28 | }; | |
29 | } | |
30 |