feat: add certbot to module

This commit is contained in:
DACHXY 2025-04-28 13:51:12 +08:00
parent d298d751fc
commit 56dfb90345
8 changed files with 176 additions and 19 deletions

View file

@ -1,29 +0,0 @@
{ 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";
};
};
}

View file

@ -19,11 +19,11 @@
./nginx.nix
./nextcloud.nix
./step-ca.nix
./cerbot.nix
../../modules/presets/minimal.nix
../../modules/bluetooth.nix
../../modules/cuda.nix
../../modules/gc.nix
../../modules/certbot.nix
];
environment.systemPackages = with pkgs; [