1 { lib, pkgs, config, ... }:
3 cfg = config.myServices.websites.immae.production;
4 varDir = "/var/lib/buildbot/outputs/immae/blog";
5 coursDir = "/var/lib/buildbot/outputs/immae/cours";
6 rechercheDir = "/var/lib/buildbot/outputs/immae/recherche";
7 recettesDir = "/var/lib/buildbot/outputs/immae/recettes";
8 historyDir = "/var/lib/buildbot/outputs/immae/history";
9 docsDir = "/var/lib/buildbot/outputs/immae/docs/";
10 env = config.myEnv.websites.immae;
12 options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website";
14 config = lib.mkIf cfg.enable {
15 myServices.chatonsProperties.enable = true;
16 services.webstats.sites = [ { name = "www.immae.eu"; } ];
18 services.websites.env.production.vhostConfs.immae_production = {
21 certMainHost = "www.immae.eu";
22 hosts = [ "www.immae.eu" "immae.eu" ];
26 Use Stats www.immae.eu
27 Header always set Strict-Transport-Security "max-age=31536000"
29 <LocationMatch /.well-known/(webfinger|host-meta)>
30 Header always set Referrer-Policy "strict-origin-when-cross-origin"
31 RequestHeader set X-Forwarded-Proto "https"
33 RewriteRule ^(.*)$ https://mastodon.immae.eu%{REQUEST_URI} [QSA,L]
37 RewriteCond "%{REQUEST_URI}" "!^/.well-known/(webfinger|host-meta)"
38 RewriteCond "%{HTTP_HOST}" "!^www\.immae\.eu$" [NC]
39 RewriteRule ^(.+)$ https://www.immae.eu$1 [R=302,L]
42 DirectoryIndex index.htm index.html
43 Options Indexes FollowSymLinks MultiViews Includes
48 Alias /.well-known/matrix ${./matrix}
49 <Directory ${./matrix}>
50 Options Indexes FollowSymLinks MultiViews Includes
53 Header always set Access-Control-Allow-Origin "*"
56 Alias /cours ${coursDir}
57 <Directory ${coursDir}>
58 DirectoryIndex index.htm index.html
59 Options Indexes FollowSymLinks MultiViews Includes
64 Alias /docs ${docsDir}
65 <Directory ${docsDir}>
66 DirectoryIndex index.htm index.html
67 Options Indexes FollowSymLinks MultiViews Includes
75 DirectoryIndex index.htm index.html
76 Options Indexes FollowSymLinks MultiViews Includes
81 Alias /recherche ${rechercheDir}
82 <Directory ${rechercheDir}>
83 DirectoryIndex index.htm index.html
84 Options Indexes FollowSymLinks MultiViews Includes
89 Alias /recettes ${recettesDir}
90 <Directory ${recettesDir}>
91 DirectoryIndex index.htm index.html
92 Options Indexes FollowSymLinks MultiViews Includes
97 Alias /history ${historyDir}
98 <Directory ${historyDir}>
99 DirectoryIndex index.html
107 services.websites.env.production.vhostConfs.immae_fr = {
110 hosts = [ "www.immae.fr" "immae.fr" ];
113 RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.immae.eu/chapeaux/
117 services.websites.env.production.vhostConfs.immae_bouya = {
120 hosts = [ "bouya.org" "www.bouya.org" ];
123 <Directory ${rechercheDir}>
124 DirectoryIndex index.htm index.html
125 Options Indexes FollowSymLinks MultiViews Includes