An open API service indexing awesome lists of open source software.

https://github.com/telkomdev/env

Development Enviroment Ready To Use Using Nix
https://github.com/telkomdev/env

Last synced: 4 months ago
JSON representation

Development Enviroment Ready To Use Using Nix

Awesome Lists containing this project

README

        

ENV - Development Enviroment



Multi Platform ready to use enviroment for developers, Support Mac OS, Linux, and Windows using WSL


Overview
Usage
Contributions

[![Built with Nix](https://github.com/nix-community/builtwithnix.org/raw/master/badge.svg)](https://builtwithnix.org)

## Overview

```mermaid
graph LR
A[User] --> B
B[nix develop FLAKE_FILE] --> C{Dependencies is Ready}
C -- no --> D([Build or Copy from cache])
C -- yes --> E(/nix/store/HASH-deps)
D --> E
E --> F(Ready to Develop)
```

## Usage

In this section is require nix installed in your system, here steps to install:

> you can **SKIP** this section when nix has been installed in your system and go use as [development environment](#as-development-environment) and [project development environment](#as-project-development-environment).

- Install nix in your system
- run command: `curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install`
- OR [Read Here for more details](https://zero-to-nix.com/start/install#up)

### Templates

> available templates or development environments.

| NAME | Lang/Framework/Tools |
| ------------------ | -------------------------------------- |
| [node](./node) | `nodejs@v19`, `[email protected]` |
| [node18](./node18) | `nodejs@v18`, `[email protected]` |
| [node16](./node16) | `nodejs@v16`, `[email protected]` |
| [node14](./node14) | `nodejs@v14`, `[email protected]` |
| [go](./go) | `[email protected]`, `gotools`, `golangci-lint` |
| [python](./python) | `[email protected]`, `[email protected]` |

- using as development environment: `nix develop "github:telkomdev/env?dir="`

### As Development Environment

- Select the _development environment_ by `` from [templates](#templates).
- and, Run command

```bash
nix develop "github:telkomdev/env?dir="
```

- example for _**node**_: `nix develop "github:telkomdev/env?dir=node"` with default shell is [Bash](https://www.gnu.org/software/bash/).
- `[email protected]` , `[email protected]`, and `[email protected]` will ready to use in your local $SHELL.

### As Project Development Environment

- Go to project directory.
- Select the _development environment_ by `` from [templates](#templates).

```bash
nix flake init -t github:telkomdev/env#
```

- example for _**node**_: `nix flake init -t github:telkomdev/env#node`
- in your project will contains all files from [node](./node).

### Usefull Command Flags

- `-c `
- maybe, in your local shell have been use `zsh`, `fish`, `ksh`, `csh`, or `powershell`. example run devshell with your current $SHELL:
- `nix develop github:telkomdev/env?dir= -c $SHELL`
- `--refresh`
- maybe, in `telkomdev/env` have been update the repository and you want to stay up to date. so, run development environment with flag `--refresh`.
- `nix develop github:telkomdev/env?dir= --refresh` - run devshell with your current $SHELL

## Contributions

### For Code Contributors

- [Learning: Nix flake](https://zero-to-nix.com/concepts/flakes)
- [Learning: Explore Nix development environments](https://zero-to-nix.com/start/nix-develop)
- [Learning: Search for Nix packages](https://zero-to-nix.com/start/nix-search)
- [Learning: Nix Language quirks](https://nixos.wiki/wiki/Nix_Language_Quirks)
- [Learning: How Nix Works](https://nixos.org/guides/how-nix-works.html)

## Acknowledgement

- [Nix](https://nixos.org)
- [dev-templates](https://github.com/the-nix-way/dev-templates)