blob: c19ab720c0c7320c7b123f828be9cdecf7e77e19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# Validates the neomutt account configurations
{ config, lib, ... }:
{
config.assertions = [
{
assertion =
!config.communication.neomutt.enable
|| !lib.any (account: account.enable && account.passwordGopassSecret != null) (
lib.attrValues config.communication.neomutt.accounts
)
|| config.security.gopass.enable;
message = ''
An enabled communication.neomutt account uses passwordGopassSecret but security.gopass.enable is not set.
Enable security.gopass to provide the account password command.
'';
}
{
assertion =
!config.communication.neomutt.enable
|| !lib.any (account: account.enable && account.gpg.key != null) (
lib.attrValues config.communication.neomutt.accounts
)
|| config.security.gpg.enable;
message = ''
An enabled communication.neomutt account specifies a GPG key but security.gpg.enable is not set.
Enable security.gpg to provide mail signing and encryption support.
'';
}
];
}
|