Browse Source

pulsebert: let caddy accept any vhost, redirect to https://mpd.hq.c3d2.de

Fixes Github issue #1
container/radius
Astro 3 years ago
committed by k-ot
parent
commit
ffd0e8720a
  1. 16
      hosts/pulsebert/configuration.nix

16
hosts/pulsebert/configuration.nix

@ -4,7 +4,10 @@
{ config, pkgs, ... }:
{
let
ympdPort = 8080;
mpdVhost = "mpd.hq.c3d2.de";
in {
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@ -176,8 +179,13 @@
agree = true;
# TODO: add auth?
config = ''
mpd.hq.c3d2.de
proxy / localhost:8080
${mpdVhost} {
proxy / localhost:${toString ympdPort}
}
:80 {
redir https://${mpdVhost}{uri}
}
'';
};
@ -196,7 +204,7 @@
# MPD music playing daemon with webinterface
services.ympd = {
enable = true;
webPort = "8080";
webPort = toString ympdPort;
};
}

Loading…
Cancel
Save