nixos/global/acme/default.nix

26 lines
448 B
Nix
Raw Normal View History

2025-01-13 11:52:09 +08:00
{
pkgs,
lib,
config,
...
}:
with lib;
let
2024-01-15 15:57:25 +08:00
cfg = config.global.acme;
2025-01-13 11:52:09 +08:00
in
{
2024-01-15 15:57:25 +08:00
options.global.acme = {
enable = mkEnableOption "ACME SSL certificates";
};
config = mkIf cfg.enable {
security.acme = {
acceptTerms = true;
defaults.email = mkDefault "koishi@514fpv.one";
defaults.group = config.services.nginx.group;
};
environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/acme" ];
};
}