Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fluentci-io/nix
Some reusables functions related to Nix, used by FluentCI
https://github.com/fluentci-io/nix
Last synced: 3 months ago
JSON representation
Some reusables functions related to Nix, used by FluentCI
- Host: GitHub
- URL: https://github.com/fluentci-io/nix
- Owner: fluentci-io
- License: mit
- Created: 2023-10-05T13:43:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-05T13:43:58.000Z (about 1 year ago)
- Last Synced: 2024-05-17T00:29:15.982Z (6 months ago)
- Language: TypeScript
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Nix Pipeline
[![deno module](https://shield.deno.dev/x/nix_installer_pipeline)](https://deno.land/x/nix_installer_pipeline)
![deno compatibility](https://shield.deno.dev/deno/^1.34)
[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/nix-installer-pipeline)](https://codecov.io/gh/fluent-ci-templates/nix-installer-pipeline)A ready-to-use Nix pipeline for building projects with Nix.
## 🚀 Usage
Run the following command to setup a new project with this template:
```bash
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
```typescript
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);
});
```