mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
getmail: use attribute set to define files
To avoid warning message concerning deprecation of the `loaOf` type.
This commit is contained in:
parent
cff9ee7cce
commit
e9beef31eb
1 changed files with 9 additions and 9 deletions
|
@ -47,14 +47,14 @@ let
|
|||
getmailEnabled = length (filter (a: a.getmail.enable) accounts) > 0;
|
||||
# Watch out! This is used by the getmail.service too!
|
||||
renderConfigFilepath = a: ".getmail/getmail${if a.primary then "rc" else a.name}";
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf getmailEnabled {
|
||||
home.file = map (a:
|
||||
{ target = renderConfigFilepath a;
|
||||
text = renderAccountConfig a;
|
||||
}) accounts;
|
||||
|
||||
};
|
||||
}
|
||||
{
|
||||
config = mkIf getmailEnabled {
|
||||
home.file =
|
||||
foldl' (a: b: a // b) {}
|
||||
(map (a: { "${renderConfigFilepath a}".text = renderAccountConfig a; })
|
||||
accounts);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue