feat: step ca for nextcloud
This commit is contained in:
parent
b655f6ad4e
commit
d6e8e23d3b
7 changed files with 110 additions and 45 deletions
29
system/dev/dn-server/cerbot.nix
Normal file
29
system/dev/dn-server/cerbot.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
systemd.timers."certbot-renew" = {
|
||||
enable = true;
|
||||
description = "certbot renew";
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-* 03:00:00";
|
||||
Persistent = true;
|
||||
OnUnitActiveSec = "1d";
|
||||
Unit = "certbot-renew.service";
|
||||
};
|
||||
wantedBy = [ "timers.target" ];
|
||||
};
|
||||
|
||||
systemd.services."certbot-renew" = {
|
||||
enable = true;
|
||||
after = [
|
||||
"nginx.service"
|
||||
"network.target"
|
||||
];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = {
|
||||
"REQUESTS_CA_BUNDLE" = "/var/lib/step-ca/certs/root_ca.crt";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.certbot}/bin/certbot renew";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue