8000 GitHub - aldoborrero/use-nix-action: Install nix and have direnv ready in your Github runners!
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

aldoborrero/use-nix-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

use-nix-action

GitHub Actions badge

This action is a composite action that combines multiple common actions when using Nix on any Github Action, minimizing the setup. Below you can see the list of included actions:

More actions will be supported soon.

Inputs

Specify inputs using the with: keyword in your workflow file.

All regular cachix/install-nix-action inputs are supported:

  • enable_install_nix_action: Enables cachix/install-nix-action. The default is true.

  • extra_nix_config: append to /etc/nix/nix.conf

  • github_access_token: configure Nix to pull from GitHub using the given GitHub token. This helps work around rate limit issues. Has no effect when access-tokens is also specified in extra_nix_config.

  • install_url: specify URL to install Nix from (useful for testing non-stable releases or pinning Nix, for example https://releases.nixos.org/nix/nix-2.3.7/install)

  • install_options: additional installer flags passed to the installer script.

  • nix_path: set NIX_PATH environment variable, for example nixpkgs=channel:nixos-unstable

All regular aldoborrero/direnv-nix-action inputs are supported:

  • enable_direnv_nix_action: Enables cachix/direnv-nix-action. The default is true.

  • use_nix_profile: Optional. Set to true to use the nix profile command instead of nix-env for installing direnv. The default is false.

  • nix_channel: Optional. Specify the nix channel nix will use to install direnv package. The default is nixpkgs.

Outputs

This action produces no outputs.

Usage

Below is an example of how to use use-nix-action in a workflow:

name: Example workflow using use-nix-action

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - uses: aldoborrero/use-nix-action@v4

    # Add additional steps that utilize the environment variables or binaries sourced from direnv

License

See License for more information.

About

Install nix and have direnv ready in your Github runners!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0