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

notmuch: 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:39:58 +01:00
parent e857249d86
commit 07dc3e5425
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -186,7 +186,7 @@ in
let
hook = name: cmds:
{
target = "${notmuchIni.database.path}/.notmuch/hooks/${name}";
"${notmuchIni.database.path}/.notmuch/hooks/${name}" = {
source = pkgs.writeScript name ''
#!${pkgs.runtimeShell}
@ -198,14 +198,15 @@ in
'';
executable = true;
};
};
in
optional (cfg.hooks.preNew != "")
optionalAttrs (cfg.hooks.preNew != "")
(hook "pre-new" cfg.hooks.preNew)
++
optional (cfg.hooks.postNew != "")
//
optionalAttrs (cfg.hooks.postNew != "")
(hook "post-new" cfg.hooks.postNew)
++
optional (cfg.hooks.postInsert != "")
//
optionalAttrs (cfg.hooks.postInsert != "")
(hook "post-insert" cfg.hooks.postInsert);
};
}