adding mailserver

This commit is contained in:
Chris Cochrun 2025-05-15 11:37:44 -05:00
parent 90fcc33b23
commit 1140e0547d
3 changed files with 34 additions and 0 deletions

View file

@ -13,6 +13,7 @@
}; };
nix-comfyui.url = "github:dyscorv/nix-comfyui"; nix-comfyui.url = "github:dyscorv/nix-comfyui";
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11";
}; };
outputs = { nixpkgs, outputs = { nixpkgs,
@ -21,6 +22,7 @@
nix-bitcoin, nix-bitcoin,
nix-comfyui, nix-comfyui,
deploy-rs, deploy-rs,
simple-nixos-mailserver,
self, self,
... }: ... }:
let let
@ -49,6 +51,7 @@
specialArgs = { inherit unstable; }; specialArgs = { inherit unstable; };
modules = [ modules = [
./system/shen/configuration.nix ./system/shen/configuration.nix
simple-nixos-mailserver.nixosModule
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;

30
modules/mail.nix Normal file
View file

@ -0,0 +1,30 @@
{ config, lib, pkgs, unstable, ... }:
let
dn = "mail.tfcconnection.org" ;
in
with lib;
{
mailserver = {
enable = true;
fqdn = dn;
domains = [ dn ];
# A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = {
"chris@${dn}" = {
hashedPassword = "$2b$05$xHEdyWDJPeJMJ1kp2imf/Ozcxe9BuAMvKfejxFM24AQga/cHw80M.";
aliases = ["postmaster@example.com"];
};
"no-reply@${dn}" = {
hashedPasswordFile = "$2b$05$MjuzjclERF7TF1I/o7cFMONHTb0VBZCk9CNRFzmWxwBUj4558S5tK";
};
};
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
# down nginx and opens port 80.
certificateScheme = "acme-nginx";
};
}

View file

@ -31,6 +31,7 @@ in
../../modules/nextcloud.nix ../../modules/nextcloud.nix
../../modules/ollama.nix ../../modules/ollama.nix
../../modules/searx.nix ../../modules/searx.nix
../../modules/mail.nix
# ../../pkgs/server.nix # ../../pkgs/server.nix
# ../../pkgs/nextcloud.nix # ../../pkgs/nextcloud.nix
]; ];