From 843e66864f50f51c6599c5ec21891e43b8ec80c8 Mon Sep 17 00:00:00 2001 From: Antoine Eiche Date: Fri, 30 Oct 2020 22:19:46 +0100 Subject: [PATCH] docs: no longer use tagged release but branch instead in docs --- README.md | 53 ++++++++++++++++++++++---------------------- docs/quick-start.rst | 12 +++++----- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 5d6ce31..ce2cacc 100644 --- a/README.md +++ b/README.md @@ -74,34 +74,35 @@ See the [mailing list archive](https://www.freelists.org/archive/snm/) ### Quick Start ```nix -{ 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 - sha256 = "0000000000000000000000000000000000000000000000000000"; - }) - ]; + { config, pkgs, ... }: + let release = "nixos-20.09"; + 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" = { - hashedPassword = "$6$/z4n8AQl6K$kiOkBTWlZfBd7PvF5GsJ8PmPgdZsFGN1jPGZufxxr60PoR0oUsrvzm2oQiflyz5ir9fFJ.d/zKm/NgLXNUsNX/"; + mailserver = { + enable = true; + fqdn = "mail.example.com"; + domains = [ "example.com" "example2.com" ]; + loginAccounts = { + "user1@example.com" = { + # mkpasswd -m sha-512 "super secret password" > /hashed/password/file/location + hashedPasswordFile = "/hashed/password/file/location"; - aliases = [ - "info@example.com" - "postmaster@example.com" - "postmaster@example2.com" - ]; - }; - }; - }; -} + aliases = [ + "info@example.com" + "postmaster@example.com" + "postmaster@example2.com" + ]; + }; + }; + }; + } ``` For a complete list of options, see `default.nix`. diff --git a/docs/quick-start.rst b/docs/quick-start.rst index 367ff13..e52afe8 100644 --- a/docs/quick-start.rst +++ b/docs/quick-start.rst @@ -4,22 +4,24 @@ Quick Start .. code:: nix { config, pkgs, ... }: - { + let release = "nixos-20.09"; + in { imports = [ (builtins.fetchTarball { - url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.2.1/nixos-mailserver-v2.2.1.tar.gz"; - sha256 = "03d49v8qnid9g9rha0wg2z6vic06mhp0b049s3whccn1axvs2zzx"; + 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" = { - hashedPassword = "$6$/z4n8AQl6K$kiOkBTWlZfBd7PvF5GsJ8PmPgdZsFGN1jPGZufxxr60PoR0oUsrvzm2oQiflyz5ir9fFJ.d/zKm/NgLXNUsNX/"; + # mkpasswd -m sha-512 "super secret password" > /hashed/password/file/location + hashedPasswordFile = "/hashed/password/file/location"; aliases = [ "info@example.com"