Tutorial: How to Install Excision Mail on NixOS Latest

Excision Mail is a mail server software that is built on the Nix package manager. In this tutorial, you will learn how to install Excision Mail on the latest version of NixOS.

Prerequisites

Before we start, make sure that you have the following prerequisites installed:

Step 1: Install Excision Mail Dependencies

Excision Mail requires the following dependencies to be installed on your system:

You can install these dependencies using the following command:

sudo nix-env -iA nixos.nix
sudo nix-env -iA nixos.nixops
sudo nix-env -iA nixos.postgresql
sudo nix-env -iA nixos.redis

Step 2: Clone Excision Mail Repository

Next, you need to clone the Excision Mail repository from GitHub. You can do this using the following command:

git clone https://github.com/Excision-Mail/Excision-Mail.git

Step 3: Configure Excision Mail

Navigate to the cloned repository and modify the configuration.nix file to match your server configuration. Make sure to replace the domain and hostname values with the name of your domain and hostname.

{
  nixpkgs.config.allowUnfree = true;
  services.mail = {
    enable = true;
    domain = "example.com";
    hostname = "mail.example.com";
    ssl = {
      enable = true;
      certificateFile = "/etc/ssl/certs/example.com.pem";
      privateKeyFile = "/etc/ssl/private/example.com.key";
      dhParamsFile = "/etc/ssl/certs/dhparam.pem";
    };
  };
}

Step 4: Deploy Excision Mail

Deploy Excision Mail using NixOps by running the following command:

nixops create ./nixops/mail-server.nix ./nixops/mail-server-deploy.nix -d mail-server

This command will create a virtual machine on your server with Excision Mail installed and configured.

Step 5: Check Excision Mail Status

Check the status of Excision Mail by running the following command:

nixops deploy -d mail-server --show-trace

This command will show the status of Excision Mail and any errors that occur during deployment.

Congratulations! You have installed Excision Mail on NixOS Latest. You can now send and receive emails using your own mail server.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!