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:
Robert Helgesson 2020-06-16 00:45:20 +02:00
parent ad4f33cfc4
commit bf7297d55c
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
11 changed files with 131 additions and 98 deletions

View file

@ -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; })