]>
Commit | Line | Data |
---|---|---|
8a964143 | 1 | { lib, pkgs, config, myconfig, ... }: |
ce493c5d | 2 | let |
f8026b6e IB |
3 | cfg = config.myServices.websites.immae.temp; |
4 | varDir = "/var/lib/ftp/temp.immae.eu"; | |
5 | env = myconfig.env.websites.temp; | |
ce493c5d | 6 | in { |
f8026b6e | 7 | options.myServices.websites.immae.temp.enable = lib.mkEnableOption "enable Temp' website"; |
ce493c5d | 8 | |
f8026b6e | 9 | config = lib.mkIf cfg.enable { |
29f8cb85 IB |
10 | services.websites.env.production.modules = [ "headers" ]; |
11 | services.websites.env.production.vhostConfs.temp = { | |
ce493c5d | 12 | certName = "eldiron"; |
7df420c2 | 13 | addToCerts = true; |
ce493c5d IB |
14 | hosts = [ "temp.immae.eu" ]; |
15 | root = varDir; | |
16 | extraConfig = [ | |
17 | '' | |
7da3ceec | 18 | Use Apaxy "${varDir}" "title .duplicity-ignore" |
ce493c5d IB |
19 | <FilesMatch ".+"> |
20 | Header set Content-Disposition attachment | |
21 | </FilesMatch> | |
22 | <Directory "${varDir}"> | |
23 | Options -Indexes | |
24 | AllowOverride None | |
25 | Require all granted | |
26 | </Directory> | |
27 | ||
28 | <DirectoryMatch "${varDir}/(.+)"> | |
29 | Options Indexes | |
30 | </DirectoryMatch> | |
31 | '' | |
32 | ]; | |
33 | }; | |
34 | }; | |
35 | } | |
36 |