mirror of
https://git.lgmrszd.xyz/Lgmrszd/nix-cfg.git
synced 2024-11-21 18:57:58 +01:00
vps1: enable mailserver
This commit is contained in:
parent
e8357e9ab0
commit
39e630f12a
3 changed files with 42 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
{ pkgs, config, data, ... }:
|
||||
let
|
||||
inherit (data.host) rootDomain;
|
||||
mailDomain = data.services.mailserver.domain;
|
||||
gtnhDomain = "gtnh.${rootDomain}";
|
||||
discDomain = "discourse.testdrive.${rootDomain}";
|
||||
akkoDomain = "akko429164.testdrive.${rootDomain}";
|
||||
|
@ -12,6 +13,7 @@ in
|
|||
./hardware-configuration.nix
|
||||
./services/postgres.nix
|
||||
./services/git.nix
|
||||
./services/mailserver.nix
|
||||
./akkotest.nix
|
||||
|
||||
(fetchTarball { url = "https://github.com/cariandrum22/nixos-vscode-server/tarball/support-for-new-dir-structure-of-vscode-server"; sha256 = "1sp4h0nb7dh7mcm8vdflihv76yz8azf5zifkcbxhq7xz48c8k5pd"; })
|
||||
|
@ -123,6 +125,7 @@ in
|
|||
dnsProvider = "porkbun";
|
||||
environmentFile = config.sops.secrets.porkbun.path;
|
||||
extraDomainNames = [
|
||||
mailDomain
|
||||
"*.${rootDomain}"
|
||||
"*.testdrive.${rootDomain}"
|
||||
# gtnhDomain
|
||||
|
|
|
@ -2,3 +2,5 @@
|
|||
subdomain = "git"
|
||||
sshPort = 22631
|
||||
|
||||
[mailserver]
|
||||
subdomain = "mail"
|
||||
|
|
37
hosts/vps1/services/mailserver.nix
Normal file
37
hosts/vps1/services/mailserver.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ lib, config, data, ...}:
|
||||
let
|
||||
inherit (data.host) rootDomain;
|
||||
inherit (data.services.mailserver) domain;
|
||||
gitDomain = data.services.git.domain;
|
||||
in
|
||||
{
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = domain;
|
||||
domains = [
|
||||
rootDomain
|
||||
domain
|
||||
gitDomain
|
||||
];
|
||||
certificateScheme = "acme";
|
||||
|
||||
enableManageSieve = true;
|
||||
indexDir = "/var/lib/dovecot/indices";
|
||||
dkimKeyBits = 4096;
|
||||
|
||||
loginAccounts = {
|
||||
"lgm@${rootDomain}" = {
|
||||
aliases = [
|
||||
"lgmrszd@${rootDomain}"
|
||||
"postmaster@${rootDomain}"
|
||||
"abuse@${rootDomain}"
|
||||
];
|
||||
};
|
||||
"forgejo@${rootDomain}" = {
|
||||
aliases = [
|
||||
"@${gitDomain}"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue