Move email account options to their owning modules
This removes the long list of submodules from
modules/accounts/email.nix
and instead move each entry to its owning module.
This commit is contained in:
parent
ad4f33cfc4
commit
bf7297d55c
11 changed files with 131 additions and 98 deletions
|
|
@ -49,6 +49,12 @@ let
|
|||
".getmail/getmail${if a.primary then "rc" else a.name}";
|
||||
|
||||
in {
|
||||
options = {
|
||||
accounts.email.accounts = mkOption {
|
||||
type = with types; attrsOf (submodule (import ./getmail-accounts.nix));
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf getmailEnabled {
|
||||
home.file = foldl' (a: b: a // b) { }
|
||||
(map (a: { "${renderConfigFilepath a}".text = renderAccountConfig a; })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue