blob: c26d059568a26b7f13edf5eca9c6db61b057f0e8 (
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
|
{ options, config, lib, namespace, ... }:
with lib; with lib.${namespace}; let
cfg = config.${namespace}.services.web.landing;
impermanence = config.${namespace}.system.impermanence;
in {
options.${namespace}.services.web.landing = with types; {
enable = mkEnableOption "cxl.sh landing page webserver";
};
config = mkIf cfg.enable {
cxl.services.web.enable = true;
environment.persistence.${impermanence.location} = {
directories = [
"/srv/web/landing"
];
};
services.nginx = {
enable = true;
virtualHosts = {
"cxl.sh" = {
addSSL = true;
enableACME = true;
root = "/srv/web/landing";
};
};
};
};
}
|