feat(acme): add acme defaults

This commit is contained in:
514fpv 2024-01-15 15:57:25 +08:00
parent 1b4ed807b7
commit 3424a9e802
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw

20
global/acme/default.nix Normal file
View file

@ -0,0 +1,20 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.acme;
in {
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" ];
};
}