accounts.email: add option to disable an account
Allow a user to disable an email account by setting `accounts.email.accounts.<name>.enable = false`. This is useful if someone wants to configure email accounts globally but only use them in certain circumstances. Everywhere email account configuration is used, check if the account is enabled before checking any attributes of the account.
This commit is contained in:
parent
07b994baed
commit
dbfcd3292d
22 changed files with 164 additions and 26 deletions
|
|
@ -11,7 +11,9 @@ let
|
|||
|
||||
jsonFormat = pkgs.formats.json { };
|
||||
|
||||
astroidAccounts = lib.filterAttrs (n: v: v.astroid.enable) config.accounts.email.accounts;
|
||||
astroidAccounts = lib.filterAttrs (
|
||||
n: v: v.enable && v.astroid.enable
|
||||
) config.accounts.email.accounts;
|
||||
|
||||
boolOpt = b: if b then "true" else "false";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue