]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - modules/private/websites/immae/temp.nix
Add specification for the private config file as a module.
[perso/Immae/Config/Nix.git] / modules / private / websites / immae / temp.nix
1 { lib, pkgs, config, ... }:
2 let
3 cfg = config.myServices.websites.immae.temp;
4 varDir = "/var/lib/ftp/temp.immae.eu";
5 env = config.myEnv.websites.temp;
6 in {
7 options.myServices.websites.immae.temp.enable = lib.mkEnableOption "enable Temp' website";
8
9 config = lib.mkIf cfg.enable {
10 services.websites.env.production.modules = [ "headers" ];
11 services.websites.env.production.vhostConfs.temp = {
12 certName = "eldiron";
13 addToCerts = true;
14 hosts = [ "temp.immae.eu" ];
15 root = varDir;
16 extraConfig = [
17 ''
18 Use Apaxy "${varDir}" "title .duplicity-ignore"
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