stuebinm
e07d23e2ee
tbh, I'm not entirely sure about these — if we have single-letter domains only, we'll run into trouble pretty quickly (e.g. with mattermost/mumble). I've kept it limited to only *.infra4future.de, where that is less of a problem (for now).
22 lines
535 B
Nix
22 lines
535 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
shortdomain = "i4f.de";
|
|
short = abbrv: target: {
|
|
name = "${abbrv}.${shortdomain}";
|
|
value = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/".return = "302 https://${target}$request_uri";
|
|
};
|
|
};
|
|
in
|
|
{
|
|
services.nginx.virtualHosts = lib.listToAttrs [
|
|
(short "d" "discuss.infra4future.de")
|
|
(short "m" "mattermost.infra4future.de")
|
|
(short "c" "cloud.infra4future.de")
|
|
(short "s" "survey.infra4future.de")
|
|
(short "g" "gitlab.infra4future.de")
|
|
];
|
|
}
|