add nixos development environment and guidelines
This commit is contained in:
59
AGENTS.md
59
AGENTS.md
@@ -196,6 +196,65 @@ $: sound("hh*8").sometimes(rev).often(x => x.gain(0.5))
|
||||
|
||||
- **Use lowercase commit messages**: All commit messages must be written in lowercase
|
||||
|
||||
### Development Environment Guidelines
|
||||
|
||||
- **Never use global npm installs**: Avoid `npm i -g` or `npm install -g` commands
|
||||
- **Use NixOS shells/dev environments**: Always prefer Nix-based development environments for reproducible builds
|
||||
- **Current NixOS version**: 25.05
|
||||
|
||||
#### Nix Development Shell
|
||||
|
||||
Use the following `flake.nix` for Strudel development:
|
||||
|
||||
```nix
|
||||
{
|
||||
description = "Strudel development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nodejs_20
|
||||
pnpm
|
||||
git
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "Strudel development environment loaded"
|
||||
echo "Node.js: $(node --version)"
|
||||
echo "pnpm: $(pnpm --version)"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
#### Usage
|
||||
|
||||
1. **Enter development shell**:
|
||||
```bash
|
||||
nix develop
|
||||
```
|
||||
|
||||
2. **Install dependencies**:
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
|
||||
3. **Start development server**:
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
### Live Performance Considerations
|
||||
|
||||
When creating beats for live performance:
|
||||
|
||||
29
flake.nix
Normal file
29
flake.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
description = "Strudel development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nodejs_20
|
||||
pnpm
|
||||
git
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "Strudel development environment loaded"
|
||||
echo "Node.js: $(node --version)"
|
||||
echo "pnpm: $(pnpm --version)"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user