1 { lib, pkgs, config, myconfig, mylibs, ... }:
3 cfg = config.services.myWebsites.Capitaines;
4 env = myconfig.env.websites.capitaines;
5 webappName = "capitaines_mastodon";
6 root = "/run/current-system/webapps/${webappName}";
7 siteDir = ./mastodon_static;
9 options.services.myWebsites.Capitaines = {
11 enable = lib.mkEnableOption "enable Capitaines's website";
15 config = lib.mkIf cfg.production.enable {
16 security.acme.certs."capitaines" = config.services.myCertificates.certConfig // {
17 domain = "mastodon.capitaines.fr";
18 extraDomains = { "capitaines.fr" = null; };
20 system.extraSystemBuilderCmds = ''
22 ln -s ${siteDir} $out/webapps/${webappName}
25 services.myWebsites.production.vhostConfs.capitaines_mastodon = {
26 certName = "capitaines";
27 hosts = [ "mastodon.capitaines.fr" ];
31 ErrorDocument 404 /index.html
33 DirectoryIndex index.html
34 Options Indexes FollowSymLinks MultiViews Includes
41 services.myWebsites.production.vhostConfs.capitaines = {
42 certName = "capitaines";
43 hosts = [ "capitaines.fr" ];
44 root = "/run/current-system/webapps/_www";
46 <Directory /run/current-system/webapps/_www>
47 DirectoryIndex index.htm