{ lib, config, ... }: let cfg = config.myServices.websites.papa.maison_bbc; in { options.myServices.websites.papa.maison_bbc.enable = lib.mkEnableOption "enable Papa Maison bbc website"; config = lib.mkIf cfg.enable { services.webstats.sites = [ { name = "maison.bbc.bouya.org"; } ]; services.websites.env.production.vhostConfs.papa_maison_bbc = { certName = "papa"; addToCerts = true; hosts = [ "maison.bbc.bouya.org" ]; root = ./maison_bbc_static; extraConfig = [ '' ErrorDocument 404 /index.html DirectoryIndex index.htm index.html AllowOverride None Require all granted '' ]; }; }; }