refactor(email-options): rename selfprivacy.email.subdomain to domain

This commit is contained in:
2025-09-16 17:11:03 +03:00
parent d843c14ffd
commit 544c9b81b4
2 changed files with 5 additions and 5 deletions

View File

@@ -193,13 +193,13 @@ with lib;
email = with lib; mkOption {
type = types.attrsOf (
types.submodule (
{ name, ... }: {
{ ... }: {
options = {
subdomain = mkOption {
domain = mkOption {
type = with types; strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
example = "myservice";
example = "myservice.example.net";
default = config.sp.domain;
description = "Email subdomain";
description = "Domain to send emails from";
};
systemdTargets = mkOption {

View File

@@ -23,7 +23,7 @@ let
inherit (value) hashedPasswordFile sendOnly;
}
) sp.email;
extraDomains = lib.mapAttrsToList (_: value: value.subdomain) sp.email;
extraDomains = lib.mapAttrsToList (_: value: value.domain) sp.email;
extraTargets = lib.mapAttrsToList (_: value: value.systemdTargets) sp.email;
in
lib.mkIf sp.modules.simple-nixos-mailserver.enable (