34 lines
573 B
Nix
34 lines
573 B
Nix
{
|
|
inputs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
enabled = config.mod.pppdotpm-site.enable;
|
|
in
|
|
{
|
|
imports = [ inputs.pppdotpm-site.nixosModules.default ];
|
|
|
|
options = {
|
|
mod.pppdotpm-site = {
|
|
enable = lib.mkEnableOption "enable ppp.pm site";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf enabled {
|
|
assertions = [
|
|
{
|
|
assertion = config.services.nginx.enable;
|
|
message = "Option 'config.services.nginx' must be enabled";
|
|
}
|
|
];
|
|
|
|
services.pppdotpm-site = {
|
|
enable = true;
|
|
domain = "ppp.pm";
|
|
useACMEHost = "ppp.pm";
|
|
};
|
|
};
|
|
}
|