summaryrefslogtreecommitdiffstats
path: root/machines/jormungand/nginx.nix
diff options
context:
space:
mode:
authorDominique Martinet @ jormungand <asmadeus@codewreck.org>2020-05-22 16:55:26 +0200
committerDominique Martinet @ jormungand <asmadeus@codewreck.org>2020-05-22 16:56:24 +0200
commit08b7675fbef2b84903d9ddc6c2ee04229731c7f9 (patch)
tree3d7c60178ca0706c6656ab4087ee87cfc91c7162 /machines/jormungand/nginx.nix
parente96b0b2af3b1411e968231e3234f6b966db4647a (diff)
jormungand nginx: move mpd to /mpd, add basic directory for jormungand.codewreck.org vhost
Diffstat (limited to 'machines/jormungand/nginx.nix')
-rw-r--r--machines/jormungand/nginx.nix21
1 files changed, 14 insertions, 7 deletions
diff --git a/machines/jormungand/nginx.nix b/machines/jormungand/nginx.nix
index ca55979..390df14 100644
--- a/machines/jormungand/nginx.nix
+++ b/machines/jormungand/nginx.nix
@@ -3,19 +3,26 @@
{
imports = [ ../../profiles/nginx.nix ];
+ systemd.services.nginx = {
+ serviceConfig.BindReadOnlyPaths = [ "/home/asmadeus/www:/www" ];
+ };
+
services.nginx.virtualHosts = {
"jormungand.codewreck.org" = {
forceSSL = true;
enableACME = true;
- locations."/" = {
+ locations."/mpd/" = {
proxyPass = "http://127.0.0.1:8080";
+ # /var/spool/nginx/mpd.htpasswd has been populated manually
+ # until proper secrets get managed...
+ extraConfig = ''
+ auth_basic "mpd";
+ auth_basic_user_file /var/spool/nginx/mpd.htpasswd;
+ '';
+ };
+ locations."/" = {
+ root = "/www";
};
- # /var/spool/nginx/mpd.htpasswd has been populated manually
- # until proper secrets get managed...
- extraConfig = ''
- auth_basic "mpd";
- auth_basic_user_file /var/spool/nginx/mpd.htpasswd;
- '';
};
"matrix.codewreck.org" = {