diff --git a/README.md b/README.md index abbfd45..dcc92d4 100644 --- a/README.md +++ b/README.md @@ -149,19 +149,14 @@ Supported attributes: boolean that controls whether file contents should be checked to decide whether a file has changed. This is useful when `path` points at files with mangled timestamps, e.g. the Nix store. - -* `exclude` (optional) - List of patterns that should excluded from being synced. The list will be - passed to the `--exclude` option of [`rsync`](https://rsync.samba.org/). - Checkout the filter rules section in the [rsync - manual](https://download.samba.org/pub/rsync/rsync.html) for further - information. * `filters` (optional) - List of filters that should be passed to rsync. Filters are specified as - attribute sets with the attributes `type` and `pattern`. Supported filter - types are `include` and `exclude`. This allows for more advanced - configurations. + List of filters that should be passed to [`rsync`](https://rsync.samba.org/). + Filters are specified as attribute sets with the attributes `type` and + `pattern`. Supported filter types are `include` and `exclude`. + Checkout the filter rules section in the + [rsync manual](https://download.samba.org/pub/rsync/rsync.html) + for further information. * `deleteExcluded` (optional) boolean that controls whether the excluded directories should be deleted diff --git a/lib/types/populate.nix b/lib/types/populate.nix index 0427dbd..4ac9b1f 100644 --- a/lib/types/populate.nix +++ b/lib/types/populate.nix @@ -84,6 +84,16 @@ type = lib.types.bool; }; exclude = lib.mkOption { + apply = x: + if x != [] then + lib.warn + "file.*.exclude is deprecated in favor of file.*.filters" + x + else + x; + description = '' + DEPRECATED, use `filters`. + ''; type = lib.types.listOf lib.types.str; default = []; example = [".git"];