diff options
Diffstat (limited to 'modules/private/websites/immae/temp.nix')
-rw-r--r-- | modules/private/websites/immae/temp.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/private/websites/immae/temp.nix b/modules/private/websites/immae/temp.nix new file mode 100644 index 0000000..0b2a3a3 --- /dev/null +++ b/modules/private/websites/immae/temp.nix | |||
@@ -0,0 +1,36 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | ||
2 | let | ||
3 | cfg = config.myServices.websites.immae.temp; | ||
4 | varDir = "/var/lib/ftp/temp.immae.eu"; | ||
5 | env = myconfig.env.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.production.modules = [ "headers" ]; | ||
11 | services.websites.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 | |||