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 jardinDir = "/var/lib/buildbot/outputs/immae/jardin";
9 historyDir = "/var/lib/buildbot/outputs/immae/history";
10 docsDir = "/var/lib/buildbot/outputs/immae/docs/";
11 env = config.myEnv.websites.immae;
13 options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website";
15 config = lib.mkIf cfg.enable {
16 myServices.chatonsProperties.enable = true;
17 services.webstats.sites = [ { name = "www.immae.eu"; } ];
19 services.websites.env.production.vhostConfs.immae_production = {
22 certMainHost = "www.immae.eu";
23 hosts = [ "www.immae.eu" "immae.eu" ];
27 Use Stats www.immae.eu
28 Header always set Strict-Transport-Security "max-age=31536000"
30 <LocationMatch /.well-known/(webfinger|host-meta)>
31 Header always set Referrer-Policy "strict-origin-when-cross-origin"
32 RequestHeader set X-Forwarded-Proto "https"
34 RewriteRule ^(.*)$ https://mastodon.immae.eu%{REQUEST_URI} [QSA,L]
38 RewriteCond "%{REQUEST_URI}" "!^/.well-known/(webfinger|host-meta)"
39 RewriteCond "%{HTTP_HOST}" "!^www\.immae\.eu$" [NC]
40 RewriteRule ^(.+)$ https://www.immae.eu$1 [R=302,L]
43 DirectoryIndex index.htm index.html
44 Options Indexes FollowSymLinks MultiViews Includes
49 Alias /.well-known/matrix ${./matrix}
50 <Directory ${./matrix}>
51 Options Indexes FollowSymLinks MultiViews Includes
54 Header always set Access-Control-Allow-Origin "*"
57 Alias /cours ${coursDir}
58 <Directory ${coursDir}>
59 DirectoryIndex index.htm index.html
60 Options Indexes FollowSymLinks MultiViews Includes
65 Alias /docs ${docsDir}
66 <Directory ${docsDir}>
67 DirectoryIndex index.htm index.html
68 Options Indexes FollowSymLinks MultiViews Includes
76 DirectoryIndex index.htm index.html
77 Options Indexes FollowSymLinks MultiViews Includes
82 Alias /recherche ${rechercheDir}
83 <Directory ${rechercheDir}>
84 DirectoryIndex index.htm index.html
85 Options Indexes FollowSymLinks MultiViews Includes
90 Alias /recettes ${recettesDir}
91 <Directory ${recettesDir}>
92 DirectoryIndex index.htm index.html
93 Options Indexes FollowSymLinks MultiViews Includes
98 Alias /jardin ${jardinDir}
99 <Directory ${jardinDir}>
100 DirectoryIndex index.htm index.html
101 Options Indexes FollowSymLinks MultiViews Includes
106 Alias /history ${historyDir}
107 <Directory ${historyDir}>
108 DirectoryIndex index.html
116 services.websites.env.production.vhostConfs.immae_fr = {
119 hosts = [ "www.immae.fr" "immae.fr" ];
122 RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.immae.eu/chapeaux/
126 services.websites.env.production.vhostConfs.immae_bouya = {
129 hosts = [ "bouya.org" "www.bouya.org" ];
132 <Directory ${rechercheDir}>
133 DirectoryIndex index.htm index.html
134 Options Indexes FollowSymLinks MultiViews Includes