diff options
| author | tv <tv@krebsco.de> | 2020-03-17 19:32:46 +0100 | 
|---|---|---|
| committer | tv <tv@krebsco.de> | 2020-03-17 19:32:46 +0100 | 
| commit | 9c16ab1ce11eb2c16af97e1b293961178a9f1b7b (patch) | |
| tree | 2fad32efa2be5d7605103a263c676b3ceb261bd5 | |
| parent | ed9fc6658226b1525bc008205d76276f0054c6c5 (diff) | |
populate file: deprecated exclude option
| -rw-r--r-- | README.md | 17 | ||||
| -rw-r--r-- | lib/types/populate.nix | 10 | 
2 files changed, 16 insertions, 11 deletions
| @@ -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"]; | 
