refactor(services): standardize service module options

This commit is contained in:
tux
2026-08-07 05:26:19 +05:30
parent 0275c70cd0
commit 2d06406284
5 changed files with 63 additions and 37 deletions

View File

@@ -12,11 +12,12 @@
in
{
options.tnix.services.nginx = {
enable = mkEnableOption "Enable Nginx";
enable = mkEnableOption "Nginx";
domain = mkOption {
type = types.str;
default = "";
description = "Base domain for the wildcard ACME certificate (disabled when empty)";
};
};
@@ -24,8 +25,8 @@
security = {
acme = {
acceptTerms = true;
defaults.email = "${userEmail}";
certs = {
defaults.email = userEmail;
certs = mkIf (cfg.domain != "") {
"${cfg.domain}" = {
group = "nginx";
domain = "*.${cfg.domain}";