From 625d607365e2afac6d0c7d2e5357630e67bb0abf Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 23 Mar 2026 01:35:27 +0100 Subject: [PATCH 1/2] Check for obvious typos in pre-commit --- .typos.toml | 2 ++ flake.nix | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 .typos.toml diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..730417b --- /dev/null +++ b/.typos.toml @@ -0,0 +1,2 @@ +[default.extend-identifiers] +reportd = "reportd" diff --git a/flake.nix b/flake.nix index 6b3ef24..76c242e 100644 --- a/flake.nix +++ b/flake.nix @@ -167,6 +167,12 @@ files = "\\.rst$"; }; + # spell checking + typos = { + enable = true; + settings.configPath = ".typos.toml"; + }; + # nix deadnix.enable = true; nixfmt.enable = true; From 4ef8541b119caa1921e161404940063cb0efa95b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 23 Mar 2026 01:35:59 +0100 Subject: [PATCH 2/2] treewide: fix typos --- docs/migrations.rst | 6 +++--- docs/setup-guide.rst | 2 +- migrations/nixos-mailserver-migration-04.py | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/migrations.rst b/docs/migrations.rst index f73a832..7807f95 100644 --- a/docs/migrations.rst +++ b/docs/migrations.rst @@ -26,7 +26,7 @@ change, requiring manual homedir relocation. Switching to UUID-based homedirs (``/var/vmail/ldap/``) ensures stable, unique paths and applies well-known best practices to mailserver management. -1. Copy the migration script script to your mailserver and make it executable: +1. Copy the migration script to your mailserver and make it executable: .. code-block:: console @@ -55,7 +55,7 @@ best practices to mailserver management. for example that of bob at ``/var/vmail/ldap/bob@example.com``. It then takes ``bob@example.com`` and queries the LDAP server for ``mail=bob@example.com`` to retrieve the UUID attribute. Finally - it starts suggesting the neceessary move operations to arrive at + it starts suggesting the necessary move operations to arrive at ``/var/vmail/ldap/f3b4e8ea-087f-42cc-95f0-cbfd99386092`` for bob. Example: @@ -82,7 +82,7 @@ best practices to mailserver management. - OpenLDAP: ``entryUUID`` (`RFC4530`_) If yours LDAP provider isn't listed you can determine the correct - attribute by quering a user entry with ``ldapsearch``. Finally, configure + attribute by querying a user entry with ``ldapsearch``. Finally, configure :option:`mailserver.ldap.attributes.uuid` accordingly. Add ``--ldap-starttls`` if you use the the `ldap://` URI scheme and require diff --git a/docs/setup-guide.rst b/docs/setup-guide.rst index a75f673..3413ad3 100644 --- a/docs/setup-guide.rst +++ b/docs/setup-guide.rst @@ -299,7 +299,7 @@ If you want to take things even further, more elaborate testing services can give you a clearer picture of your mail service and suggest ways to improve it. -- `internet.nl`_ (supported by the Dutch Governement) +- `internet.nl`_ (supported by the Dutch Government) - `MECSA`_ (supported by the European Commission) Finally, you can also browse the full list of `options`_ provided by NixOS mailserver. diff --git a/migrations/nixos-mailserver-migration-04.py b/migrations/nixos-mailserver-migration-04.py index f24b80a..d0cc4af 100644 --- a/migrations/nixos-mailserver-migration-04.py +++ b/migrations/nixos-mailserver-migration-04.py @@ -190,7 +190,7 @@ running with `--execute`. Specific details can be found further up.""") if moved: print(f""" -- {color(f"{moved} home directories were migrated succesfully.", GREEN)} {"(dry run)" if dry_run else ""} +- {color(f"{moved} home directories were migrated successfully.", GREEN)} {"(dry run)" if dry_run else ""} This is great news, they are now UUID-based and will be immune to username changes!""") if skipped and accounts: @@ -221,7 +221,7 @@ running with `--execute`. Specific details can be found further up.""") if moves_failed: print(f""" -- {color("{moves_failed} home directores could not be renamed", RED)} +- {color("{moves_failed} home directories could not be renamed", RED)} No reason to panic, but the script tried to rename a home directory and that triggered and error. Check further up what went wrong.""") @@ -246,7 +246,7 @@ if __name__ == "__main__": "--ldap-uri", type=str, required=True, - help="URI for your LDAP server; ldaps://ldap1.example.com (TLS) or ldap://ldap1.exampe.com (Plain)", + help="URI for your LDAP server; ldaps://ldap1.example.com (TLS) or ldap://ldap1.example.com (Plain)", ) parser.add_argument( "--ldap-starttls", @@ -284,7 +284,7 @@ if __name__ == "__main__": parser.add_argument( "--ldap-filter", default="(mail=%s)", - help="LDAP query that filters for an account by the name in /var/vmail/ldap/ field, e.g. mail=%%s or uid=%%s if the name is not an email adress.", + help="LDAP query that filters for an account by the name in /var/vmail/ldap/ field, e.g. mail=%%s or uid=%%s if the name is not an email address.", ) parser.add_argument( "--ldap-attr-uuid",