summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNigel Bray <nrbray@gmx.net>2023-01-01 17:38:07 +0000
committerAntoine Eiche <lewo@abesis.fr>2023-07-05 21:53:56 +0200
commitd460e9ff62ea1238fb3348a87326b743ae177902 (patch)
treec7b362d0f4f21fccbcfbdcc4b419db5a6a2d2187
parent0c1801b48995ec6909e040abedaa56a64f0db430 (diff)
Fix and improve the setup guide
-rw-r--r--README.md41
-rw-r--r--docs/setup-guide.rst27
2 files changed, 18 insertions, 50 deletions
diff --git a/README.md b/README.md
index cf8bbc2..5e8db21 100644
--- a/README.md
+++ b/README.md
@@ -71,46 +71,11 @@ can stay up to date with bug fixes and updates.
- Subscribe to the [mailing list](https://www.freelists.org/archive/snm/)
- Join the Libera Chat IRC channel `#nixos-mailserver`
-### Quick Start
-
-```nix
- { config, pkgs, ... }:
- let release = "nixos-21.11";
- in {
- 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 = "0000000000000000000000000000000000000000000000000000";
- })
- ];
-
- mailserver = {
- enable = true;
- fqdn = "mail.example.com";
- domains = [ "example.com" "example2.com" ];
- loginAccounts = {
- "user1@example.com" = {
- # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' > /hashed/password/file/location
- hashedPasswordFile = "/hashed/password/file/location";
-
- aliases = [
- "info@example.com"
- "postmaster@example.com"
- "postmaster@example2.com"
- ];
- };
- };
- };
- }
-```
-
-For a complete list of options, see `default.nix`.
-
+## How to Set Up a 10/10 Mail Server Guide
+Check out the [Setup Guide](https://nixos-mailserver.readthedocs.io/en/latest/setup-guide.html) in the project's documentation.
-## How to Set Up a 10/10 Mail Server Guide
-Check out the [Complete Setup Guide](https://nixos-mailserver.readthedocs.io/en/latest/setup-guide.html) in the project's documentation.
+For a complete list of options, [see in readthedocs](https://nixos-mailserver.readthedocs.io/en/latest/options.html).
## Development
diff --git a/docs/setup-guide.rst b/docs/setup-guide.rst
index c74a53d..dafe60c 100644
--- a/docs/setup-guide.rst
+++ b/docs/setup-guide.rst
@@ -48,18 +48,19 @@ Setup the server
~~~~~~~~~~~~~~~~
The following describes a server setup that is fairly complete. Even
-though there are more possible options (see the ``default.nix`` file),
-these should be the most common ones.
+though there are more possible options (see the `NixOS Mailserver
+options documentation <options.htmls>`_), these should be the most
+common ones.
.. code:: nix
- { config, pkgs, ... }:
- {
+ { config, pkgs, ... }: {
imports = [
(builtins.fetchTarball {
- # Pick a commit from the branch you are interested in
- url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/A-COMMIT-ID/nixos-mailserver-A-COMMIT-ID.tar.gz";
- # And set its hash
+ # Pick a release version you are interested in and set its hash, e.g.
+ url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-23.05/nixos-mailserver-nixos-23.05.tar.gz";
+ # To get the sha256 of the nixos-mailserver tarball, we can use the nix-prefetch-url command:
+ # release="nixos-23.05"; nix-prefetch-url "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz" --unpack
sha256 = "0000000000000000000000000000000000000000000000000000";
})
];
@@ -72,17 +73,19 @@ these should be the most common ones.
# A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = {
- "user1@example.com" = {
- hashedPasswordFile = "/a/file/containing/a/hashed/password";
- aliases = ["postmaster@example.com"];
- };
- "user2@example.com" = { ... };
+ "user1@example.com" = {
+ hashedPasswordFile = "/a/file/containing/a/hashed/password";
+ aliases = ["postmaster@example.com"];
+ };
+ "user2@example.com" = { ... };
};
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
# down nginx and opens port 80.
certificateScheme = "acme-nginx";
};
+ security.acme.acceptTerms = true;
+ security.acme.defaults.email = "security@example.com";
}
After a ``nixos-rebuild switch`` your server should be running all