]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - modules/private/websites/immae/temp.nix
c24844e25f75d8d250f830b3927ea96fa927e61a
[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.immae_temp = {
12 certName = "immae";
13 addToCerts = true;
14 hosts = [ "temp.immae.eu" ];
15 root = varDir;
16 extraConfig = [
17 ''
18 Use Apaxy "${varDir}" "title .duplicity-ignore"
19 <Directory "${varDir}">
20 Options -Indexes
21 AllowOverride None
22 Require all granted
23 </Directory>
24
25 <DirectoryMatch "${varDir}/(.+)">
26 Options Indexes
27 </DirectoryMatch>
28 ''
29 ];
30 };
31 };
32 }
33