2023-06-09 20:01:44 +03:00
|
|
|
{ config, lib, pkgs, tools, ... }:
|
2023-03-06 17:52:52 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (tools.meta) domain;
|
2023-06-09 20:01:44 +03:00
|
|
|
|
|
|
|
extraGroups = [ "nginx" ]
|
|
|
|
++ lib.optional config.services.kanidm.enableServer "kanidm";
|
2023-03-06 17:52:52 +02:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
security.acme.certs."internal.${domain}" = {
|
|
|
|
domain = "*.internal.${domain}";
|
|
|
|
extraDomainNames = [ "*.internal.${domain}" ];
|
|
|
|
dnsProvider = "pdns";
|
|
|
|
group = "nginx";
|
2023-06-09 20:01:44 +03:00
|
|
|
postRun = ''
|
|
|
|
${pkgs.acl}/bin/setfacl -Rb out/
|
|
|
|
${lib.concatStringsSep "\n" (
|
|
|
|
map (group: "${pkgs.acl}/bin/setfacl -Rm g:${group}:rX out/") extraGroups
|
|
|
|
)}
|
|
|
|
'';
|
2023-03-06 17:52:52 +02:00
|
|
|
};
|
|
|
|
}
|