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:
parent
e857249d86
commit
07dc3e5425
1 changed files with 15 additions and 14 deletions
|
@ -186,26 +186,27 @@ in
|
||||||
let
|
let
|
||||||
hook = name: cmds:
|
hook = name: cmds:
|
||||||
{
|
{
|
||||||
target = "${notmuchIni.database.path}/.notmuch/hooks/${name}";
|
"${notmuchIni.database.path}/.notmuch/hooks/${name}" = {
|
||||||
source = pkgs.writeScript name ''
|
source = pkgs.writeScript name ''
|
||||||
#!${pkgs.runtimeShell}
|
#!${pkgs.runtimeShell}
|
||||||
|
|
||||||
export PATH="${pkgs.notmuch}/bin''${PATH:+:}$PATH"
|
export PATH="${pkgs.notmuch}/bin''${PATH:+:}$PATH"
|
||||||
export NOTMUCH_CONFIG="${config.xdg.configHome}/notmuch/notmuchrc"
|
export NOTMUCH_CONFIG="${config.xdg.configHome}/notmuch/notmuchrc"
|
||||||
export NMBGIT="${config.xdg.dataHome}/notmuch/nmbug"
|
export NMBGIT="${config.xdg.dataHome}/notmuch/nmbug"
|
||||||
|
|
||||||
${cmds}
|
${cmds}
|
||||||
'';
|
'';
|
||||||
executable = true;
|
executable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
optional (cfg.hooks.preNew != "")
|
optionalAttrs (cfg.hooks.preNew != "")
|
||||||
(hook "pre-new" cfg.hooks.preNew)
|
(hook "pre-new" cfg.hooks.preNew)
|
||||||
++
|
//
|
||||||
optional (cfg.hooks.postNew != "")
|
optionalAttrs (cfg.hooks.postNew != "")
|
||||||
(hook "post-new" cfg.hooks.postNew)
|
(hook "post-new" cfg.hooks.postNew)
|
||||||
++
|
//
|
||||||
optional (cfg.hooks.postInsert != "")
|
optionalAttrs (cfg.hooks.postInsert != "")
|
||||||
(hook "post-insert" cfg.hooks.postInsert);
|
(hook "post-insert" cfg.hooks.postInsert);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue