blob: 09839c8cf67050cf448e3e2c0e0ad8e3786201f4 (
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
31
|
# Validates the neomutt account configurations
{ config, lib, ... }:
let
cfg = config.communication.neomutt;
in
{
config.assertions = [
{
assertion =
!cfg.enable
|| !lib.any (account: account.enable && account.password-gopass-secret != null) (
lib.attrValues cfg.accounts
)
|| config.security.gopass.enable;
message = ''
An enabled communication.neomutt account uses password-gopass-secret but security.gopass.enable is not set.
Enable security.gopass to provide the account password command.
'';
}
{
assertion =
!cfg.enable
|| !lib.any (account: account.enable && account.gpg.key != null) (lib.attrValues cfg.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.
'';
}
];
}
|