blob: 86dfde35fab7c923db6ce06fb8b49463302e9a12 (
plain) (
tree)
|
|
{ lib, pkgs, config, myconfig, ... }:
let
cfg = config.services.myWebsites.Temp;
varDir = "/var/lib/ftp/temp.immae.eu";
env = myconfig.env.websites.temp;
in {
options.services.myWebsites.Temp = {
production = {
enable = lib.mkEnableOption "enable Temp' website";
};
};
config = lib.mkIf cfg.production.enable {
services.websites.production.modules = [ "headers" ];
services.websites.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>
''
];
};
};
}
|