Refactor configs
This commit is contained in:
parent
84f7bc915f
commit
9710cae748
12 changed files with 125 additions and 128 deletions
|
|
@ -1,16 +1,15 @@
|
|||
{config, ...}: let
|
||||
dn = config.constants.domain;
|
||||
usr = config.constants.userName;
|
||||
mailSecret = "mail/${usr}/password";
|
||||
{config, ...}:
|
||||
with config.constants; let
|
||||
mailSecret = "mail/${userName}/password";
|
||||
in {
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "mail.${dn}";
|
||||
domains = [dn];
|
||||
fqdn = "mail.${domain}";
|
||||
domains = [domain];
|
||||
|
||||
loginAccounts = {
|
||||
"${usr}@${dn}" = {
|
||||
aliases = [config.constants.postMaster];
|
||||
"${userName}@${domain}" = {
|
||||
aliases = [postMaster];
|
||||
hashedPasswordFile = config.sops.secrets.${mailSecret}.path;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue