blob: 978bd088494da979ef333a63921ceeeba0090204 (
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
35
36
37
38
39
40
41
42
|
{ lib, ... }:
{
options.services = {
nginx = {
enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
virtualHosts = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule {
options = {
enableSSL = lib.mkOption {
default = false;
type = lib.types.bool;
};
ssl = {
certificate = lib.mkOption {
default = "";
type = lib.types.str;
};
certificateKey = lib.mkOption {
default = "";
type = lib.types.str;
};
};
};
}
);
default = { };
};
};
};
config = {
services.nginx.virtualHosts."example.com" = {
# Typo: "certficate" instead of "certificate" (nested within submodule)
ssl.certficate = "/path/to/cert";
};
};
}
|