sombrero: Add ppp.pm-site

This commit is contained in:
Alexander Heldt
2023-11-12 21:49:30 +01:00
parent 9655c2c1d7
commit c24b4615f3
4 changed files with 60 additions and 1 deletions

View File

@@ -86,6 +86,7 @@
calibre-web.enable = true;
transmission.enable = true;
restic.enable = true;
pppdotpm-site.enable = true;
};
# Copy the NixOS configuration file and link it from the resulting system

View File

@@ -0,0 +1,31 @@
{ lib, config, ... }:
let
enabled = config.mod.pppdotpm-site.enable;
nginxEnabled = config.mod.nginx.enable;
in
{
options = {
mod.pppdotpm-site = {
enable = lib.mkEnableOption "enable ppp.pm site";
};
};
config = {
security.acme = lib.mkIf (enabled && nginxEnabled) {
certs = {
"ppp.pm" = {
webroot = "/var/lib/acme/acme-challenge/";
email = "p@ppp.pm";
group = "nginx";
};
};
};
services.pppdotpm-site = {
enable = true;
domain = "ppp.pm";
useACMEHost = "ppp.pm";
};
};
}