]>
Commit | Line | Data |
---|---|---|
1 | { lib, pkgs, config, myconfig, ... }: | |
2 | let | |
3 | cfg = config.myServices.websites.immae.production; | |
4 | varDir = "/var/lib/buildbot/outputs/immaeEu"; | |
5 | env = myconfig.env.websites.immae; | |
6 | in { | |
7 | options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website"; | |
8 | ||
9 | config = lib.mkIf cfg.enable { | |
10 | services.webstats.sites = [ { name = "www.immae.eu"; } ]; | |
11 | ||
12 | services.websites.env.production.vhostConfs.immae = { | |
13 | certName = "eldiron"; | |
14 | addToCerts = true; | |
15 | hosts = [ "www.immae.eu" ]; | |
16 | root = varDir; | |
17 | extraConfig = [ | |
18 | '' | |
19 | Use Stats www.immae.eu | |
20 | ||
21 | <Directory ${varDir}> | |
22 | DirectoryIndex index.php index.htm index.html | |
23 | Options Indexes FollowSymLinks MultiViews Includes | |
24 | AllowOverride All | |
25 | Require all granted | |
26 | </Directory> | |
27 | '' | |
28 | ]; | |
29 | }; | |
30 | ||
31 | services.websites.env.production.vhostConfs.bouya = { | |
32 | certName = "eldiron"; | |
33 | addToCerts = true; | |
34 | hosts = [ "bouya.org" "www.bouya.org" ]; | |
35 | root = null; | |
36 | extraConfig = [ '' | |
37 | RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.normalesup.org/~bouya/ | |
38 | '' ]; | |
39 | }; | |
40 | }; | |
41 | } |