diff --git a/README.md b/README.md new file mode 100644 index 0000000..628bd77 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +actions/nix +=========== + +[![Build status][ci:badge]][ci:url] + + [ci:badge]: https://ironforge.madhouse-project.org/actions/actions/nix/badge + [ci:url]: https://ironforge.madhouse-project.org/actions/actions/nix/latest-log + +This repository provides a number of [Forgejo Actions][forgejo:action], all aimed at making it more pleasant to work with both Nix (either by running under NixOS, or using the Nix package manager on its own). The provided actions are listed below. All examples show the default inputs, unless otherwise specified. If the defaults are fine, those inputs can be safely omitted. + + [forgejo:action]: https://forgejo.org/docs/latest/user/actions/ + +## `actions/nix/install` + +### Usage + +``` yaml +- name: Install Nix on the host + uses: actions/nix/install@main + with: + install-url: "https://nixos.org/nix/install" +``` + +## `actions/nix/build` + +### Usage + +``` yaml +- name: Build a Nix package + uses: actions/nix/build@main + with: + flake: . + package: # there's no default, Nix itself will fall back to "default" + logs: false +``` + +## `actions/nix/develop` + +### Usage + +``` yaml +- name: Run something in a development environment + uses: actions/nix/develop@main + with: + flake: . + package: # no default, see above + run: | + # No default here, either! +``` + +The commands specified in the `run` input will be written to a shell script, and the shell script will be executed with `bash -eo pipefail`. + +## `actions/nix/shell` + +### Usage + +``` yaml +- name: Run something in a Nix shell + uses: actions/nix/shell@main + with: + flake: . + package: # no default, see above + run: | + # No default here, either! +``` + +The commands specified in the `run` input will be written to a shell script, and the shell script will be executed with `bash -eo pipefail`.