home-manager/tests/modules
Genevieve bec87d536c
aerc: add assertion to limit per-account extraConfig to UI config (#4196)
* aerc: fix per-account extraConfig section names

The aerc configuration file `aerc.conf` can contain 10 different
sections, but only the UI section supports what the aerc manual calls
contextual configuration. This works by appending to the section heading
either `:account=name` or `:folder=bar`.

The aerc-accounts module, however, applied `mkAccountConfig` to each
section heading declared in
`config.accounts.email.accounts.<name>.aerc.extraConfig.*`. This means
home-manager will generate files with `[general:account=default]` and
the options will not be recognized by aerc.

To address this, and since it doesn't make sense for other sections to
only be under a single account's scope, an assertion has been added
to confirm that only sectons that support contextual config (i.e.,
only the UI section) is declared.

This also addresses confusions like declaring
`accounts.email.accounts.*.aerc.extraConfig.general.unsafe-accounts-conf
= true` and triggering a warning message because
`programs.aerc.extraConfig.general.unsafe-accounts-conf` was unset.

This commit also updated documentation throughout the aerc modules to
be in line with this change, and fixed minor typos/formatting therein.

Co-authored-by: Genevieve <genevieve@sunlashed.garden>

* aerc: make assertion plaintext and add test case

This commit adds a test case to check both the warning on unset
`unsafe-accounts-conf = true` when aerc accounts are configured
with Nix, and the new assertion when per-account configuration
contains unsupported subsections (i.e. general).

It also fixes minor formatting issues and typos.
2023-07-14 20:34:28 +02:00
..
accounts tests: allow testing assertions 2021-02-07 22:48:22 +01:00
config/i18n i18n: Use glibcLocales from NixOS if possible (#2333) (#4177) 2023-07-04 11:28:25 +02:00
files tests: various minor cleanups 2023-05-13 00:09:52 +02:00
home-environment i18n: Use glibcLocales from NixOS if possible (#2333) (#4177) 2023-07-04 11:28:25 +02:00
i18n/input-method kime: Fix kime systemd service broken (#2621) 2022-01-17 13:53:42 -05:00
launchd launchd: make Launch Agents config a freeform setting 2023-03-25 23:59:58 +01:00
misc i18n: Use glibcLocales from NixOS if possible (#2333) (#4177) 2023-07-04 11:28:25 +02:00
programs aerc: add assertion to limit per-account extraConfig to UI config (#4196) 2023-07-14 20:34:28 +02:00
services imapnotify: move test 2023-07-09 10:53:28 +02:00
systemd i18n: Use glibcLocales from NixOS if possible (#2333) (#4177) 2023-07-04 11:28:25 +02:00
targets-darwin darwin: use full path to commands in activation script 2022-11-05 12:14:08 +09:00
targets-linux xdg.systemDirs: init module (#1797) 2021-05-10 20:14:42 -04:00
xresources xresources: add missing test file 2020-06-28 11:23:34 +02:00