diff --git a/global/acme/default.nix b/global/acme/default.nix new file mode 100644 index 00000000..dacf367e --- /dev/null +++ b/global/acme/default.nix @@ -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" ]; + }; +}