1 { lib, pkgs, config, ... }:
3 cfg = config.myServices.websites.capitaines.production;
4 env = config.myEnv.websites.capitaines;
6 options.myServices.websites.capitaines.production.enable = lib.mkEnableOption "enable Capitaines's website";
8 config = lib.mkIf cfg.enable {
9 myServices.websites.webappDirs.capitaines_mastodon = ./mastodon_static;
10 services.websites.env.production.vhostConfs.capitaines_mastodon = let
11 root = "/run/current-system/webapps/capitaines_mastodon";
13 certName = "capitaines";
14 certMainHost = "mastodon.capitaines.fr";
15 hosts = [ "mastodon.capitaines.fr" ];
19 ErrorDocument 404 /index.html
21 DirectoryIndex index.html
22 Options Indexes FollowSymLinks MultiViews Includes
29 myServices.websites.webappDirs.capitaines_discourse = ./discourse_static;
30 services.websites.env.production.vhostConfs.capitaines_discourse = let
31 root = "/run/current-system/webapps/capitaines_discourse";
33 certName = "capitaines";
35 hosts = [ "discourse.capitaines.fr" ];
39 ErrorDocument 404 /index.html
41 DirectoryIndex index.html
42 Options Indexes FollowSymLinks MultiViews Includes
49 services.websites.env.production.vhostConfs.capitaines = {
50 certName = "capitaines";
52 hosts = [ "capitaines.fr" ];
53 root = "/run/current-system/webapps/_www";
55 <Directory /run/current-system/webapps/_www>
56 DirectoryIndex index.htm