]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - nixops/modules/websites/ftp/temp.nix
Start moving websites configuration to modules
[perso/Immae/Config/Nix.git] / nixops / modules / websites / ftp / temp.nix
CommitLineData
8a964143 1{ lib, pkgs, config, myconfig, ... }:
ce493c5d
IB
2let
3 cfg = config.services.myWebsites.Temp;
4 varDir = "/var/lib/ftp/temp.immae.eu";
5 env = myconfig.env.websites.temp;
6in {
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 security.acme.certs."eldiron".extraDomains."temp.immae.eu" = null;
15
daf64e3f
IB
16 services.websites.production.modules = [ "headers" ];
17 services.websites.production.vhostConfs.temp = {
ce493c5d
IB
18 certName = "eldiron";
19 hosts = [ "temp.immae.eu" ];
20 root = varDir;
21 extraConfig = [
22 ''
7da3ceec 23 Use Apaxy "${varDir}" "title .duplicity-ignore"
ce493c5d
IB
24 <FilesMatch ".+">
25 Header set Content-Disposition attachment
26 </FilesMatch>
27 <Directory "${varDir}">
28 Options -Indexes
29 AllowOverride None
30 Require all granted
31 </Directory>
32
33 <DirectoryMatch "${varDir}/(.+)">
34 Options Indexes
35 </DirectoryMatch>
36 ''
37 ];
38 };
39 };
40}
41