2021-04-27 08:10:17 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
shortdomain = "i4f.de";
|
|
|
|
short = abbrv: target: {
|
|
|
|
name = "${abbrv}.${shortdomain}";
|
|
|
|
value = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
2021-05-03 09:50:37 +00:00
|
|
|
locations."/".return = "302 https://${target}$request_uri";
|
2021-04-27 08:10:17 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
services.nginx.virtualHosts = lib.listToAttrs [
|
|
|
|
(short "d" "discuss.infra4future.de")
|
|
|
|
(short "m" "mattermost.infra4future.de")
|
|
|
|
];
|
|
|
|
}
|