From e9beef31eb7a6eb00efc5338e682085e99e3110d Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 11 Jan 2020 19:49:24 +0100 Subject: [PATCH] getmail: use attribute set to define files To avoid warning message concerning deprecation of the `loaOf` type. --- modules/programs/getmail.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/programs/getmail.nix b/modules/programs/getmail.nix index e5f8c4b20..3de898ef7 100644 --- a/modules/programs/getmail.nix +++ b/modules/programs/getmail.nix @@ -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); + }; +}