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