1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-15 23:59:45 +01:00

getmail: use attribute set to define files

To avoid warning message concerning deprecation of the `loaOf` type.
This commit is contained in:
Robert Helgesson 2020-01-11 19:49:24 +01:00
parent cff9ee7cce
commit e9beef31eb
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -47,14 +47,14 @@ let
getmailEnabled = length (filter (a: a.getmail.enable) accounts) > 0; getmailEnabled = length (filter (a: a.getmail.enable) accounts) > 0;
# Watch out! This is used by the getmail.service too! # Watch out! This is used by the getmail.service too!
renderConfigFilepath = a: ".getmail/getmail${if a.primary then "rc" else a.name}"; renderConfigFilepath = a: ".getmail/getmail${if a.primary then "rc" else a.name}";
in in
{ {
config = mkIf getmailEnabled { config = mkIf getmailEnabled {
home.file = map (a: home.file =
{ target = renderConfigFilepath a; foldl' (a: b: a // b) {}
text = renderAccountConfig a; (map (a: { "${renderConfigFilepath a}".text = renderAccountConfig a; })
}) accounts; accounts);
}; };
} }