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 env = config.myEnv.websites.immae;
11 options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website";
13 config = lib.mkIf cfg.enable {
14 services.webstats.sites = [ { name = "www.immae.eu"; } ];
16 services.websites.env.production.vhostConfs.immae_production = {
19 certMainHost = "www.immae.eu";
20 hosts = [ "www.immae.eu" "immae.eu" ];
24 Use Stats www.immae.eu
25 Header always set Strict-Transport-Security "max-age=31536000"
27 <LocationMatch /.well-known/(webfinger|host-meta)>
28 Header always set Referrer-Policy "strict-origin-when-cross-origin"
29 RequestHeader set X-Forwarded-Proto "https"
31 RewriteRule ^(.*)$ https://mastodon.immae.eu%{REQUEST_URI} [QSA,L]
35 RewriteCond "%{REQUEST_URI}" "!^/.well-known/(webfinger|host-meta)"
36 RewriteCond "%{HTTP_HOST}" "!^www\.immae\.eu$" [NC]
37 RewriteRule ^(.+)$ https://www.immae.eu$1 [R=302,L]
40 DirectoryIndex index.htm index.html
41 Options Indexes FollowSymLinks MultiViews Includes
46 Alias /.well-known/chatonsinfos ${./chatons}
47 <Directory ${./chatons}>
48 Options Indexes FollowSymLinks MultiViews Includes
53 Alias /.well-known/matrix ${./matrix}
54 <Directory ${./matrix}>
55 Options Indexes FollowSymLinks MultiViews Includes
58 Header always set Access-Control-Allow-Origin "*"
61 Alias /cours ${coursDir}
62 <Directory ${coursDir}>
63 DirectoryIndex index.htm index.html
64 Options Indexes FollowSymLinks MultiViews Includes
71 DirectoryIndex index.htm index.html
72 Options Indexes FollowSymLinks MultiViews Includes
77 Alias /recherche ${rechercheDir}
78 <Directory ${rechercheDir}>
79 DirectoryIndex index.htm index.html
80 Options Indexes FollowSymLinks MultiViews Includes
85 Alias /recettes ${recettesDir}
86 <Directory ${recettesDir}>
87 DirectoryIndex index.htm index.html
88 Options Indexes FollowSymLinks MultiViews Includes
93 Alias /history ${historyDir}
94 <Directory ${historyDir}>
95 DirectoryIndex index.html
103 services.websites.env.production.vhostConfs.immae_fr = {
106 hosts = [ "www.immae.fr" "immae.fr" ];
109 RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.immae.eu/chapeaux/
113 services.websites.env.production.vhostConfs.immae_bouya = {
116 hosts = [ "bouya.org" "www.bouya.org" ];
119 <Directory ${rechercheDir}>
120 DirectoryIndex index.htm index.html
121 Options Indexes FollowSymLinks MultiViews Includes