diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index a83b833..50a2f72 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -2,7 +2,11 @@ on: push: branches: - main + paths-ignore: + - '**.md' pull_request: + paths-ignore: + - '**.md' workflow_dispatch: jobs: build: diff --git a/README.md b/README.md index d20aac6..55364fa 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,27 @@ and `path` types to a matcher. The matcher is a function that takes a `path` and `type` and returns `true` if the pattern matches. +The flake usage is like this: + +```nix +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; + nix-filter.url = "github:numtide/nix-filter"; + }; + outputs = { self, nixpkgs, nix-filter }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + # Avoid calling it nix-filter as it may result in an infinite recursion + filter = nix-filter.lib; + # .... + in + { + # ... + }; +} +``` + ## Builtin matchers The functor also contains a number of matchers: