1 { lib, pkgs, config, myconfig, ... }:
3 cfg = config.myServices.websites.capitaines.production;
4 env = myconfig.env.websites.capitaines;
5 webappName = "capitaines_mastodon";
6 root = "/run/current-system/webapps/${webappName}";
7 siteDir = ./mastodon_static;
9 options.myServices.websites.capitaines.production.enable = lib.mkEnableOption "enable Capitaines's website";
11 config = lib.mkIf cfg.enable {
12 system.extraSystemBuilderCmds = ''
14 ln -s ${siteDir} $out/webapps/${webappName}
17 services.websites.production.vhostConfs.capitaines_mastodon = {
18 certName = "capitaines";
19 certMainHost = "mastodon.capitaines.fr";
20 hosts = [ "mastodon.capitaines.fr" ];
24 ErrorDocument 404 /index.html
26 DirectoryIndex index.html
27 Options Indexes FollowSymLinks MultiViews Includes
34 services.websites.production.vhostConfs.capitaines = {
35 certName = "capitaines";
37 hosts = [ "capitaines.fr" ];
38 root = "/run/current-system/webapps/_www";
40 <Directory /run/current-system/webapps/_www>
41 DirectoryIndex index.htm