diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-16 15:31:07 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-16 16:11:15 +0100 |
commit | a95ab089420d6edf24f22500dabf7876d329dc91 (patch) | |
tree | ee769ebdc128d9ef34608462778d1b7f35ac5469 /nixops/modules/websites/tools/mastodon | |
parent | 7da3ceece7fe6c49046e97f37fc353db9b8a981c (diff) | |
download | Nix-a95ab089420d6edf24f22500dabf7876d329dc91.tar.gz Nix-a95ab089420d6edf24f22500dabf7876d329dc91.tar.zst Nix-a95ab089420d6edf24f22500dabf7876d329dc91.zip |
Move tools websites to stable web directories
Diffstat (limited to 'nixops/modules/websites/tools/mastodon')
-rw-r--r-- | nixops/modules/websites/tools/mastodon/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nixops/modules/websites/tools/mastodon/default.nix b/nixops/modules/websites/tools/mastodon/default.nix index 0aaff70..6e34280 100644 --- a/nixops/modules/websites/tools/mastodon/default.nix +++ b/nixops/modules/websites/tools/mastodon/default.nix | |||
@@ -5,6 +5,7 @@ let | |||
5 | env = myconfig.env.tools.mastodon; | 5 | env = myconfig.env.tools.mastodon; |
6 | }; | 6 | }; |
7 | 7 | ||
8 | root = "/run/current-system/webapps/tools_mastodon"; | ||
8 | cfg = config.services.myWebsites.tools.mastodon; | 9 | cfg = config.services.myWebsites.tools.mastodon; |
9 | in { | 10 | in { |
10 | options.services.myWebsites.tools.mastodon = { | 11 | options.services.myWebsites.tools.mastodon = { |
@@ -138,10 +139,14 @@ in { | |||
138 | "headers" "proxy" "proxy_wstunnel" "proxy_http" | 139 | "headers" "proxy" "proxy_wstunnel" "proxy_http" |
139 | ]; | 140 | ]; |
140 | security.acme.certs."eldiron".extraDomains."mastodon.immae.eu" = null; | 141 | security.acme.certs."eldiron".extraDomains."mastodon.immae.eu" = null; |
142 | system.extraSystemBuilderCmds = '' | ||
143 | mkdir -p $out/webapps | ||
144 | ln -s ${mastodon.railsRoot}/public/ $out/webapps/tools_mastodon | ||
145 | ''; | ||
141 | services.myWebsites.tools.vhostConfs.mastodon = { | 146 | services.myWebsites.tools.vhostConfs.mastodon = { |
142 | certName = "eldiron"; | 147 | certName = "eldiron"; |
143 | hosts = ["mastodon.immae.eu" ]; | 148 | hosts = ["mastodon.immae.eu" ]; |
144 | root = "${mastodon.railsRoot}/public/"; | 149 | root = root; |
145 | extraConfig = [ '' | 150 | extraConfig = [ '' |
146 | Header always set Referrer-Policy "strict-origin-when-cross-origin" | 151 | Header always set Referrer-Policy "strict-origin-when-cross-origin" |
147 | Header always set Strict-Transport-Security "max-age=31536000" | 152 | Header always set Strict-Transport-Security "max-age=31536000" |
@@ -178,7 +183,7 @@ in { | |||
178 | Options -MultiViews | 183 | Options -MultiViews |
179 | </Directory> | 184 | </Directory> |
180 | 185 | ||
181 | <Directory ${mastodon.railsRoot}/public/> | 186 | <Directory ${root}> |
182 | Require all granted | 187 | Require all granted |
183 | Options -MultiViews +FollowSymlinks | 188 | Options -MultiViews +FollowSymlinks |
184 | </Directory> | 189 | </Directory> |