/env

Development Enviroment Ready To Use Using Nix

Primary LanguageNixMIT LicenseMIT

ENV - Development Enviroment

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

OverviewUsageContributions

Built with Nix

Overview

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)
Loading

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 and 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

Templates

available templates or development environments.

NAME Lang/Framework/Tools
node nodejs@v19, yarn@1.22
node18 nodejs@v18, yarn@1.22
node16 nodejs@v16, yarn@1.22
node14 nodejs@v14, yarn@1.22
go go@v1.19, gotools, golangci-lint
python python@v3.12, pip@22.3.1
  • using as development environment: nix develop "github:telkomdev/env?dir=<NAME>"

As Development Environment

  • Select the development environment by <NAME> from templates.
  • and, Run command
nix develop "github:telkomdev/env?dir=<NAME>"
  • example for node: nix develop "github:telkomdev/env?dir=node" with default shell is Bash.
    • nodejs@v18.x , yarn@1.22.x, and pnpm@7.x will ready to use in your local $SHELL.

As Project Development Environment

  • Go to project directory.
  • Select the development environment by <NAME> from templates.
nix flake init -t github:telkomdev/env#<NAME>
  • example for node: nix flake init -t github:telkomdev/env#node
  • in your project will contains all files from node.

Usefull Command Flags

  • -c <ENV_VAR>
    • 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=<NAME> -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=<NAME> --refresh - run devshell with your current $SHELL

Contributions

For Code Contributors

Acknowledgement