From f3972b82612e7307ebb4838f71bad90ce7592103 Mon Sep 17 00:00:00 2001 From: Kai Norman Clasen Date: Mon, 10 Apr 2023 18:19:16 +0200 Subject: [PATCH 1/2] Add flake usage to README --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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: From 4656b6549627b2ed6f91b1d63a9522de1a678555 Mon Sep 17 00:00:00 2001 From: Kai Norman Clasen Date: Mon, 10 Apr 2023 18:34:09 +0200 Subject: [PATCH 2/2] Skip CI if only MD files change --- .github/workflows/nix.yml | 4 ++++ 1 file changed, 4 insertions(+) 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: