Skip to content

Commit

Permalink
docs(contributing): add Nix setup instructions for project dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
use-the-fork committed Jul 24, 2024
1 parent 9bc7589 commit 8e4f2a4
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@ Install the dependencies using npm:
npm i
```

### Nix Setup (With Flakes)

Pull down this project locally.

when you enter the directory if you have direnv installed run:

```sh
direnv allow
```

If you do not run

```sh
nix develop
```

this will pull down all dependencies, install hooks and formatters etc. You are now free to run.

```sh
npm i
```

## Building the project

Run the `build` script:
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,38 @@

This will create a `.ai-shell` file in your home directory.

### Nix Setup (With Flakes)

This package can be integrated into Nix environments as a custom package. Follow the steps below to set it up:

1. **Add this package to your flakes inputs:**
```nix
inputs.ai-shell.url = "github:BuilderIO/ai-shell";
```

2. **Add the package to your system or Home Manager configuration:**
- For Home Manager:
```nix
home.packages = with pkgs; [
inputs.ai-shell.defaultPackage.x86_64-linux
];
```
- **or** for NixOS system packages:
```nix
users.users.<your-username>.packages = with pkgs; [
inputs.ai-shell.defaultPackage.x86_64-linux
];
```
3. **Activate the configuration:**
If you are on NixOS, execute:
```bash
sudo nixos-rebuild switch --flake .#your-computer
```

And you are good to go!


## Usage

```bash
Expand Down

0 comments on commit 8e4f2a4

Please sign in to comment.