2021-08-07 13:14:15 +00:00
|
|
|
{ config, lib, pkgs, sources, ... }:
|
2021-03-17 21:35:51 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
mumblesite = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "mumble.hacc.space-website";
|
2021-04-16 13:54:25 +00:00
|
|
|
src = sources.mumble-website.outPath.outPath;
|
2021-03-17 21:35:51 +00:00
|
|
|
buildPhase = ''
|
|
|
|
${pkgs.jekyll.outPath}/bin/jekyll build
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r _site/* $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
2020-11-27 20:56:20 +00:00
|
|
|
{
|
2021-08-07 13:14:15 +00:00
|
|
|
hexchen.bindmounts."/var/lib/murmur" = "/persist/var/lib/murmur";
|
|
|
|
|
2020-11-27 20:56:20 +00:00
|
|
|
services.murmur = {
|
2020-12-27 10:17:38 +00:00
|
|
|
enable = true;
|
2020-11-27 20:56:20 +00:00
|
|
|
logDays = -1;
|
2021-01-07 00:29:41 +00:00
|
|
|
welcometext = "Welcome to mumble4future! Brought to you by infra4future. The server is now reachable under mumble.hacc.space, please update your bookmarks.";
|
2020-11-27 20:56:20 +00:00
|
|
|
sslKey = "/var/lib/acme/mumble.hacc.space/key.pem";
|
|
|
|
sslCert = "/var/lib/acme/mumble.hacc.space/fullchain.pem";
|
2020-12-21 22:31:00 +00:00
|
|
|
bandwidth = 128000;
|
2020-11-27 20:56:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ config.services.murmur.port ];
|
|
|
|
networking.firewall.allowedUDPPorts = [ config.services.murmur.port ];
|
|
|
|
|
2021-03-17 21:35:51 +00:00
|
|
|
services.nginx.virtualHosts =
|
|
|
|
let vhost = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = mumblesite.outPath;
|
2020-11-27 20:56:20 +00:00
|
|
|
};
|
2021-03-17 21:35:51 +00:00
|
|
|
in {
|
|
|
|
"mumble.infra4future.de" = vhost;
|
|
|
|
"mumble.hacc.space" = vhost;
|
|
|
|
};
|
2021-01-07 00:29:41 +00:00
|
|
|
|
2020-11-27 20:56:20 +00:00
|
|
|
# set ACLs so that the murmur user can read the certificates
|
2021-08-30 13:10:01 +00:00
|
|
|
security.acme.certs."mumble.hacc.space".postRun = "${pkgs.acl}/bin/setfacl -Rm u:murmur:rX /var/lib/acme/mumble.hacc.space";
|
2022-01-12 22:50:07 +00:00
|
|
|
security.acme.certs."mumble.hacc.space".group = "murmur";
|
2020-11-27 20:56:20 +00:00
|
|
|
}
|