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