blob: 57d878737a42eef9ed0c114990d7d02dae0ce06e (
plain) (
tree)
|
|
{ lib, pkgs, config, myconfig, ... }:
let
cfg = config.myServices.websites.capitaines.production;
env = myconfig.env.websites.capitaines;
webappName = "capitaines_mastodon";
root = "/run/current-system/webapps/${webappName}";
siteDir = ./mastodon_static;
in {
options.myServices.websites.capitaines.production.enable = lib.mkEnableOption "enable Capitaines's website";
config = lib.mkIf cfg.enable {
myServices.websites.webappDirs."${webappName}" = siteDir;
services.websites.production.vhostConfs.capitaines_mastodon = {
certName = "capitaines";
certMainHost = "mastodon.capitaines.fr";
hosts = [ "mastodon.capitaines.fr" ];
root = root;
extraConfig = [
''
ErrorDocument 404 /index.html
<Directory ${root}>
DirectoryIndex index.html
Options Indexes FollowSymLinks MultiViews Includes
Require all granted
</Directory>
''
];
};
services.websites.production.vhostConfs.capitaines = {
certName = "capitaines";
addToCerts = true;
hosts = [ "capitaines.fr" ];
root = "/run/current-system/webapps/_www";
extraConfig = [ ''
<Directory /run/current-system/webapps/_www>
DirectoryIndex index.htm
Require all granted
</Directory>
'' ];
};
};
}
|