ghost: add mail server
This commit is contained in:
parent
eb25c3c32f
commit
08d66a4053
|
@ -32,6 +32,11 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixos-mailserver = {
|
||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
dzgui-nix = {
|
||||
url = "github:lelgenio/dzgui-nix";
|
||||
};
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
./users.nix
|
||||
./writefreely.nix
|
||||
./renawiki.nix
|
||||
./email.nix
|
||||
];
|
||||
|
||||
# Use more aggressive compression then the default.
|
||||
|
|
34
hosts/ghost/email.nix
Normal file
34
hosts/ghost/email.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, inputs, ... }: {
|
||||
networking.hostName = "lelgenio.xyz";
|
||||
|
||||
imports = [
|
||||
inputs.nixos-mailserver.nixosModules.mailserver
|
||||
];
|
||||
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "mail.lelgenio.xyz";
|
||||
domains = [ "lelgenio.xyz" ];
|
||||
certificateScheme = "acme-nginx";
|
||||
loginAccounts = {
|
||||
"lelgenio@lelgenio.xyz" = {
|
||||
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
|
||||
aliases = [ "postmaster@lelgenio.xyz" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Webmail
|
||||
services.roundcube = rec {
|
||||
enable = true;
|
||||
package = pkgs.roundcube.withPlugins (p: [ p.carddav ]);
|
||||
hostName = "mail.lelgenio.xyz";
|
||||
extraConfig = ''
|
||||
$config['smtp_host'] = "tls://${hostName}:587";
|
||||
$config['smtp_user'] = "%u";
|
||||
$config['smtp_pass'] = "%p";
|
||||
$config['plugins'] = [ "carddav" ];
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue