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