blob: 2365ba1737b5f97b1e16d1dae1a9ec884e1393ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
{ config, lib, ... }:
with lib; let
cfg = config.local.web.sites.portal;
inherit (config.local) domains;
in
{
options.local.web.sites.portal = {
enable = mkEnableOption "public non-fqdn portal";
};
config = mkIf cfg.enable {
local.web = {
enable = mkDefault true;
ownedCerts = [ "host" "exdev" ];
defaultACMEHost = domains.host.main;
};
services.nginx.virtualHosts = {
${domains.host.www} = {
forceSSL = true;
useACMEHost = domains.host.main;
serverAliases = [ domains.host.main ];
};
${domains.exdev.main} = {
forceSSL = true;
useACMEHost = domains.exdev.main;
serverAliases = [ domains.exdev.www ];
locations."/fsociety".return = "301 https://meet.posixlycorrect.com/%C6%92%C6%A8%C5%8F%C4%8B%D3%80%C9%99%CF%AE%D0%A3";
};
};
};
}
|