Sandboxes
Sandboxes / starters for different languages
It is useful for skipping most of the set-up phase β© to :
- do a kata / exercise π₯
- start a project ποΈ
- test something in an isolated environment π§«
What is in the box ? π¦
-
With a focus on reproducibility
It is possible to use it without Nix, but reproducibility cannot be guaranteed as you may have installed an incompatible version
-
Always with sample code π§©
-
Always with tests π§ͺ
-
Trying to use standard tools depending on the ecosystem π§°
-
Trying to have a formatter πͺ
-
Trying to have a linter π
Usage
Online with GitPod
On you own machine
Requirements
- Install Nix
- Preferably with
nix-installer
- Preferably with
- Install DirEnv
- Install Git
List sandboxes
export NIX_CONFIG='extra-experimental-features = flakes nix-command'
nix run 'gitlab:pinage404/nix-sandboxes'
Get one sandbox
e.g. for Rust
export NIX_CONFIG='extra-experimental-features = flakes nix-command'
nix run 'gitlab:pinage404/nix-sandboxes' rust ./your_new_project_directory
Optional steps
VSCode
If you want to use VSCode
-
Install VSCode
-
Open from the command line in the folder
code . -
Install recommanded extensions
- Prefer a video ? Watch the video tutorial
Cache
To avoid rebuilding things that have already been built elsewhere, use Cachix
-
Install Cachix
-
Use Nix's cache
cachix use pinage404-nix-sandboxes
Baby steps
If you want to use git-gamble
:
a tool that
blends TDD (Test Driven Development) + TCR (
test && commit || revert)
to make sure to develop the right thing π,
baby step by baby step πΆπ¦Ά
The tool is already included right out of the box, and tests should pass
git gamble --pass