Skip to content

fluent-ci-templates/nix-installer-pipeline

Repository files navigation

Nix Pipeline

deno module deno compatibility

A ready-to-use Nix pipeline for building projects with Nix.

🚀 Usage

Run the following command to setup a new project with this template:

fluentci init -t nix_installer

This will create a .fluentci folder in your project.

Exported functions

name description
withNix Adds the Nix package manager to the container.
withDevbox Adds the Devbox to the container.
withDevenv Adds the Devenv to the container.
withFlox Adds the Flox to the container.

Example

import Client, { connect } from "https://sdk.fluentci.io/latest/mod.ts";
import { withDevbox } from "https://nix.fluentci.io/latest/mod.ts";

connect(async (client: Client) => {
  // you can use withDevbox, withDevenv or withFlox
  const ctr = withDevbox(
    client
      .pipeline("nix-installer")
      .container()
      .from("alpine")
      .withExec(["apk", "add", "curl", "bash"]),
  );

  const result = await ctr.stdout();

  console.log(result);
});