1 { lib, pkgs, config, myconfig, ... }:
3 cfg = config.myServices.websites.papa.surveillance;
4 varDir = "/var/lib/ftp/papa";
6 options.myServices.websites.papa.surveillance.enable = lib.mkEnableOption "enable Papa surveillance's website";
8 config = lib.mkIf cfg.enable {
9 security.acme.certs."ftp".extraDomains."surveillance.maison.bbc.bouya.org" = null;
13 script = pkgs.writeScript "cleanup-papa" ''
14 #!${pkgs.stdenv.shell}
15 d=$(date -d "7 days ago" +%Y%m%d)
16 for i in /var/lib/ftp/papa/*/20[0-9][0-9][0-9][0-9][0-9][0-9]; do
17 if [ "$d" -gt $(basename $i) ]; then
25 0 6 * * * wwwrun ${script}
30 services.websites.production.vhostConfs.papa = {
32 certMainHost = "surveillance.maison.bbc.bouya.org";
33 hosts = [ "surveillance.maison.bbc.bouya.org" ];
37 Use Apaxy "${varDir}" "title .duplicity-ignore"
42 Require ldap-group cn=surveillance.maison.bbc.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu