From 46288f7c6076c0bf533c0c686d5d521ca7e00edb Mon Sep 17 00:00:00 2001 From: nialov Date: Fri, 27 Feb 2026 09:20:22 +0200 Subject: [PATCH 1/2] docs(README): reorder sections --- README.md | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 2f4ff91..b53d051 100644 --- a/README.md +++ b/README.md @@ -31,28 +31,6 @@ See `nix/ci/default.nix` for action configuration in `nix`. This is turned by th `pre-commit` hook, or by running `nix run .#render-workflows`, into the workflow file in `.github/workflows/main.yaml`. -### Advanced: control relative path with `--no-prepend-git-root` - -By default, workflow files will be rendered relative to the git repo root. To write workflow files relative to the process working directory (CWD), run: - -``` -nix run .#render-workflows -- --no-prepend-git-root -``` - -This is useful when you want files output somewhere *other* than the git root (e.g., when scripting or testing in a subdirectory). - -#### Passing the flag in pre-commit configuration - -If you need to add arguments (such as `--no-prepend-git-root`) to the pre-commit hook invocation, you can do so, e.g., using the `raw.args` option in your Nix flake configuration: - -```nix -pre-commit.settings.hooks.render-actions = { - raw.args = [ - "--no-prepend-git-root" - ]; -}; -``` - ## Installation This project uses `flake-parts`. You need to add the module exposed by this @@ -70,7 +48,9 @@ repository and configure your own workflows. }); ``` -## Note on `git-hooks` import collisions +## Advanced + +### Note on `git-hooks` import collisions The `actions-nix` module automatically imports `git-hooks`. If you also explicitly import `git-hooks` in your downstream project, and the versions @@ -119,6 +99,28 @@ actions-nix = { Let `actions-nix` handle the import, and avoid importing `git-hooks` directly. +### Control relative path with `--no-prepend-git-root` + +By default, workflow files will be rendered relative to the git repo root. To write workflow files relative to the process working directory (CWD), run: + +``` +nix run .#render-workflows -- --no-prepend-git-root +``` + +This is useful when you want files output somewhere *other* than the git root (e.g., when scripting or testing in a subdirectory). + +#### Passing the flag in pre-commit configuration + +If you need to add arguments (such as `--no-prepend-git-root`) to the pre-commit hook invocation, you can do so, e.g., using the `raw.args` option in your Nix flake configuration: + +```nix +pre-commit.settings.hooks.render-actions = { + raw.args = [ + "--no-prepend-git-root" + ]; +}; +``` + ## About This is a work-in-progress project. My plan is to implement all From 1dc91ba97d84911a977afd13b83e9cc2a8e47552 Mon Sep 17 00:00:00 2001 From: nialov Date: Fri, 27 Feb 2026 09:22:49 +0200 Subject: [PATCH 2/2] docs(README): make minor adjustment --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b53d051..1e83069 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,6 @@ repository and configure your own workflows. }); ``` -## Advanced - ### Note on `git-hooks` import collisions The `actions-nix` module automatically imports `git-hooks`. If you also @@ -99,6 +97,8 @@ actions-nix = { Let `actions-nix` handle the import, and avoid importing `git-hooks` directly. +## Advanced + ### Control relative path with `--no-prepend-git-root` By default, workflow files will be rendered relative to the git repo root. To write workflow files relative to the process working directory (CWD), run: