+{ lib, config, ... }:
+let
+ cfg = config.myServices.websites.isabelle.iridologie;
+ varDir = "/var/lib/ftp/isabelle";
+in {
+ options.myServices.websites.isabelle.iridologie.enable = lib.mkEnableOption "enable Iridologie's website";
+
+ config = lib.mkIf cfg.enable {
+ services.webstats.sites = [ { name = "iridologie.icommandeur.org"; } ];
+ services.websites.env.production.vhostConfs.iridologie = {
+ certName = "aten";
+ hosts = [ "icommandeur.org" "www.icommandeur.org" "iridologie.icommandeur.org" ];
+ root = varDir;
+ extraConfig = [
+ ''
+ Use Stats iridologie.icommandeur.org
+ RewriteEngine On
+ RewriteCond "%{HTTP_HOST}" "!^iridologie\.icommandeur\.org$" [NC]
+ RewriteRule ^(.+)$ https://iridologie.icommandeur.org$1 [R=302,L]
+
+ <Directory ${varDir}>
+ DirectoryIndex index.html
+ AllowOverride None
+ Require all granted
+ </Directory>
+ ''
+ ];
+ };
+ };
+}
+