vps1: enable mailserver

This commit is contained in:
Lgmrszd 2024-05-16 01:07:17 +03:00
parent e8357e9ab0
commit 39e630f12a
No known key found for this signature in database
GPG key ID: 9396B8BA6FBB14DE
3 changed files with 42 additions and 0 deletions

View file

@ -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

View file

@ -2,3 +2,5 @@
subdomain = "git"
sshPort = 22631
[mailserver]
subdomain = "mail"

View 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}"
];
};
};
};
}