depot/cluster/services/certificates/internal-wildcard.nix

24 lines
550 B
Nix
Raw Permalink Normal View History

2023-08-31 01:55:45 +03:00
{ config, lib, pkgs, depot, ... }:
let
2023-08-31 01:55:45 +03:00
inherit (depot.lib.meta) domain;
extraGroups = [ "nginx" ]
++ lib.optional config.services.kanidm.enableServer "kanidm";
in
{
security.acme.certs."internal.${domain}" = {
domain = "*.internal.${domain}";
extraDomainNames = [ "*.internal.${domain}" ];
2023-12-04 20:31:03 +02:00
dnsProvider = "exec";
group = "nginx";
postRun = ''
${pkgs.acl}/bin/setfacl -Rb .
${lib.concatStringsSep "\n" (
map (group: "${pkgs.acl}/bin/setfacl -Rm g:${group}:rX .") extraGroups
)}
'';
};
}