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 myServices.websites.webappDirs."${webappName}" = siteDir;
14 services.websites.production.vhostConfs.capitaines_mastodon = {
15 certName = "capitaines";
16 certMainHost = "mastodon.capitaines.fr";
17 hosts = [ "mastodon.capitaines.fr" ];
21 ErrorDocument 404 /index.html
23 DirectoryIndex index.html
24 Options Indexes FollowSymLinks MultiViews Includes
31 services.websites.production.vhostConfs.capitaines = {
32 certName = "capitaines";
34 hosts = [ "capitaines.fr" ];
35 root = "/run/current-system/webapps/_www";
37 <Directory /run/current-system/webapps/_www>
38 DirectoryIndex index.htm