mirror of
https://github.com/nix-community/home-manager
synced 2024-11-15 23:59:45 +01:00
notmuch: use writeShellScript
This commit is contained in:
parent
e9beef31eb
commit
ee01d24a45
1 changed files with 2 additions and 6 deletions
|
@ -186,18 +186,14 @@ in
|
||||||
let
|
let
|
||||||
hook = name: cmds:
|
hook = name: cmds:
|
||||||
{
|
{
|
||||||
"${notmuchIni.database.path}/.notmuch/hooks/${name}" = {
|
"${notmuchIni.database.path}/.notmuch/hooks/${name}".source =
|
||||||
source = pkgs.writeScript name ''
|
pkgs.writeShellScript name ''
|
||||||
#!${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;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
optionalAttrs (cfg.hooks.preNew != "")
|
optionalAttrs (cfg.hooks.preNew != "")
|
||||||
|
|
Loading…
Reference in a new issue