blob: c95e2eae312b56b86b520c2a5817de7cee5bdf5c (
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
|
{ 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" ];
defaultACMEHost = domains.host.main;
};
services.nginx.virtualHosts.${domains.host.www} = {
forceSSL = true;
useACMEHost = domains.host.main;
serverAliases = [ domains.host.main ];
};
};
}
|