{ lib, pkgs, config, mylibs, ... }: let cfg = config.services.myWebsites.Chloe; in { options.services.myWebsites.Chloe = { production = { enable = lib.mkEnableOption "enable Chloe's website in production"; }; integration = { enable = lib.mkEnableOption "enable Chloe's website in integration"; }; }; config = lib.mkMerge [ (lib.mkIf cfg.production.enable { security.acme.certs."chloe" = config.services.myCertificates.certConfig // { domain = "osteopathe-cc.fr"; extraDomains = { "www.osteopathe-cc.fr" = null; }; }; }) (lib.mkIf cfg.integration.enable { security.acme.certs."eldiron".extraDomains."chloe.immae.eu" = null; }) ]; }