diff --git a/flake.lock b/flake.lock index 3f93525..341a815 100644 --- a/flake.lock +++ b/flake.lock @@ -740,11 +740,11 @@ ] }, "locked": { - "lastModified": 1779934676, - "narHash": "sha256-wp/K//HuAPN0TureyV342zjoee+vSq64+guX35X7DMU=", + "lastModified": 1777743346, + "narHash": "sha256-gJ0aOSvmr1g06oSKGNDlIvfex7BVVxyP3txQ9gg2fdQ=", "owner": "genebean", "repo": "private-flake", - "rev": "7ad20ffceb1b6e48af13b2207241441a2cafa97e", + "rev": "8a0c1d3cf8a4eee614ac8c665dce70794de5f973", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 4caf4ae..dd34b2c 100644 --- a/flake.nix +++ b/flake.nix @@ -180,6 +180,7 @@ additionalModules = [ inputs.cup-collector.nixosModules.default inputs.private-flake.nixosModules.private.nixnuc + inputs.simple-nixos-mailserver.nixosModule ]; }; # This machines is currently running Ubuntu and diff --git a/modules/hosts/nixos/nixnuc/default.nix b/modules/hosts/nixos/nixnuc/default.nix index abf7108..dc6b924 100644 --- a/modules/hosts/nixos/nixnuc/default.nix +++ b/modules/hosts/nixos/nixnuc/default.nix @@ -68,6 +68,25 @@ in ]; }; + mailserver = { + enable = true; + enableImap = false; + enableImapSsl = false; + fqdn = "mail.${home_domain}"; + domains = [ + home_domain + ]; + forwards = { + "${username}@localhost" = "${username}@technicalissues.us"; + "root@localhost" = "root@technicalissues.us"; + "root@${config.networking.hostName}" = "root@technicalissues.us"; + }; + stateVersion = 3; + + # Use Let's Encrypt certificates from Nginx + certificateScheme = "acme"; + }; + networking = { # Open ports in the firewall. firewall = { @@ -307,6 +326,7 @@ in "${home_domain}" = { default = true; serverAliases = [ + "mail.${home_domain}" "nix-tester.${home_domain}" ]; listen = [