20 lines
413 B
Nix
20 lines
413 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
let
|
||
|
shortdomain = "i4f.de";
|
||
|
short = abbrv: target: {
|
||
|
name = "${abbrv}.${shortdomain}";
|
||
|
value = {
|
||
|
forceSSL = true;
|
||
|
enableACME = true;
|
||
|
locations."/".return = "301 https://${target}$request_uri";
|
||
|
};
|
||
|
};
|
||
|
in
|
||
|
{
|
||
|
services.nginx.virtualHosts = lib.listToAttrs [
|
||
|
(short "d" "discuss.infra4future.de")
|
||
|
(short "m" "mattermost.infra4future.de")
|
||
|
];
|
||
|
}
|