aboutsummaryrefslogtreecommitdiff
path: root/modules/lib/file-type.nix
diff options
context:
space:
mode:
authorAndrew Scott <3648487+ayyjayess@users.noreply.github.com>2018-02-16 23:32:29 +0000
committerRobert Helgesson <robert@rycee.net>2018-07-27 22:07:12 +0200
commit30cba446f2c2e04db5a5001aaf606a4a5563e1de (patch)
tree71fd3e832b478ccb9cf81568b28a7b6c9c303c7f /modules/lib/file-type.nix
parentdda65c0877b0b6c98d0f628374f2651d92597086 (diff)
files: add `onChange` option
This option allows execution of arbitrary shell code when a file that is linked into the home directory has been changed between generations.
Diffstat (limited to '')
-rw-r--r--modules/lib/file-type.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/lib/file-type.nix b/modules/lib/file-type.nix
index 80d4ab45b2c..0c435aaa908 100644
--- a/modules/lib/file-type.nix
+++ b/modules/lib/file-type.nix
@@ -95,6 +95,17 @@ in
are symbolic links to the files of the source directory.
'';
};
+
+ onChange = mkOption {
+ type = types.lines;
+ default = "";
+ description = ''
+ Shell commands to run when file has changed between
+ generations. The script will be run
+ <emphasis>after</emphasis> the new files have been linked
+ into place.
+ '';
+ };
};
config = {