refactor(email-options): selfprivacy.email.domain -> subdomain
This commit is contained in:
@@ -195,11 +195,11 @@ with lib;
|
|||||||
types.submodule (
|
types.submodule (
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
options = {
|
options = {
|
||||||
domain = mkOption {
|
subdomain = mkOption {
|
||||||
type = with types; strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
|
type = with types; strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
|
||||||
example = "myservice.example.net";
|
example = "myservice";
|
||||||
default = config.sp.domain;
|
default = config.sp.domain;
|
||||||
description = "Domain to send emails from";
|
description = "Subdomain to send emails from";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemdTargets = mkOption {
|
systemdTargets = mkOption {
|
||||||
|
@@ -23,7 +23,7 @@ let
|
|||||||
inherit (value) hashedPasswordFile sendOnly;
|
inherit (value) hashedPasswordFile sendOnly;
|
||||||
}
|
}
|
||||||
) sp.email;
|
) sp.email;
|
||||||
extraDomains = lib.mapAttrsToList (_: value: value.domain) sp.email;
|
extraDomains = lib.mapAttrsToList (_: value: "${value.subdomain}.${sp.domain}") sp.email;
|
||||||
extraTargets = lib.mapAttrsToList (_: value: value.systemdTargets) sp.email;
|
extraTargets = lib.mapAttrsToList (_: value: value.systemdTargets) sp.email;
|
||||||
in
|
in
|
||||||
lib.mkIf sp.modules.simple-nixos-mailserver.enable (
|
lib.mkIf sp.modules.simple-nixos-mailserver.enable (
|
||||||
|
Reference in New Issue
Block a user