+++ /dev/null
-{ lib, config, ... }:
-let
- cfg = config.myServices.websites.capitaines.landing_pages;
- certName = "capitaines";
- domain = "capitaines.fr";
-in {
- options.myServices.websites.capitaines.landing_pages.enable = lib.mkEnableOption "enable Capitaines's landing pages";
-
- config = lib.mkIf cfg.enable {
- services.websites.env.production.vhostConfs.capitaines_mastodon = rec {
- inherit certName;
- certMainHost = "mastodon.${domain}";
- hosts = [ certMainHost ];
- root = ./mastodon_static;
- extraConfig = [
- ''
- ErrorDocument 404 /index.html
- <Directory ${./mastodon_static}>
- DirectoryIndex index.html
- Options Indexes FollowSymLinks MultiViews Includes
- Require all granted
- </Directory>
- ''
- ];
- };
-
- services.websites.env.production.vhostConfs.capitaines_discourse = {
- inherit certName;
- addToCerts = true;
- hosts = [ "discourse.${domain}" ];
- root = ./discourse_static;
- extraConfig = [
- ''
- ErrorDocument 404 /index.html
- <Directory ${./discourse_static}>
- DirectoryIndex index.html
- Options Indexes FollowSymLinks MultiViews Includes
- Require all granted
- </Directory>
- ''
- ];
- };
-
- services.websites.env.production.vhostConfs.capitaines = {
- inherit certName;
- addToCerts = true;
- hosts = [ domain ];
- root = ../_www;
- extraConfig = [ ''
- <Directory ${../_www}>
- DirectoryIndex index.htm
- Require all granted
- </Directory>
- '' ];
- };
- };
-}