2023-07-08 14:22:13 -05:00
|
|
|
{ config, lib, pkgs, ... }:
|
2023-07-07 23:44:40 -05:00
|
|
|
let
|
|
|
|
release = "nixos-23.05";
|
|
|
|
cfg = config.services.nixosmail;
|
|
|
|
in {
|
|
|
|
options.services.nixosmail = {
|
2023-07-08 14:22:13 -05:00
|
|
|
enable = lib.mkEnableOption "NixOS mail server";
|
2023-07-07 23:44:40 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
(builtins.fetchTarball {
|
|
|
|
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz";
|
|
|
|
# This hash needs to be updated
|
|
|
|
sha256 = "1ngil2shzkf61qxiqw11awyl81cr7ks2kv3r3k243zz7v2xakm5c";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-07-08 14:22:13 -05:00
|
|
|
config = lib.mkIf cfg.enable {
|
2023-07-07 23:44:40 -05:00
|
|
|
mailserver = {
|
|
|
|
enable = true;
|
|
|
|
fqdn = "mail.beepboop.systems";
|
|
|
|
domains = [ "beepboop.systems" ];
|
|
|
|
loginAccounts = {
|
|
|
|
"ryan@beepboop.systems" = {
|
|
|
|
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' > /hashed/password/file/location
|
|
|
|
hashedPasswordFile = "/etc/ryan-beepboop-systemsuser-pass";
|
|
|
|
|
|
|
|
aliases = [
|
|
|
|
"info@beepboop.systems"
|
|
|
|
"postmaster@beepboop.systems"
|
|
|
|
];
|
|
|
|
};
|
2023-11-22 16:31:31 -06:00
|
|
|
|
|
|
|
"mailsynchronization@beepboop.systems" = {
|
|
|
|
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' > /hashed/password/file/location
|
|
|
|
hashedPasswordFile = "/etc/ryan-beepboop-systemsuser-pass";
|
|
|
|
};
|
2023-07-07 23:44:40 -05:00
|
|
|
};
|
|
|
|
certificateScheme = "acme-nginx";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|