mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 19:29:47 +01:00
vdirsyncer: create postHook script when non-empty
This commit is contained in:
parent
c103ab9566
commit
7d4dc024de
2 changed files with 5 additions and 4 deletions
|
@ -137,8 +137,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
postHook = mkOption {
|
postHook = mkOption {
|
||||||
type = types.lines;
|
type = types.nullOr types.lines;
|
||||||
default = "";
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Command to call for each item creation and modification.
|
Command to call for each item creation and modification.
|
||||||
The command will be called with the path of the new/updated
|
The command will be called with the path of the new/updated
|
||||||
|
|
|
@ -26,8 +26,9 @@ let
|
||||||
filterAttrs (_: v: v != null)
|
filterAttrs (_: v: v != null)
|
||||||
((getAttrs [ "type" "fileExt" "encoding" ] a.local) // {
|
((getAttrs [ "type" "fileExt" "encoding" ] a.local) // {
|
||||||
path = a.local.path;
|
path = a.local.path;
|
||||||
postHook = pkgs.writeShellScriptBin "post-hook" a.vdirsyncer.postHook
|
postHook = optionalString (a.vdirsyncer.postHook != null)
|
||||||
+ "/bin/post-hook";
|
(pkgs.writeShellScriptBin "post-hook" a.vdirsyncer.postHook
|
||||||
|
+ "/bin/post-hook");
|
||||||
});
|
});
|
||||||
|
|
||||||
remoteStorage = a:
|
remoteStorage = a:
|
||||||
|
|
Loading…
Reference in a new issue