1
1
mirror of https://github.com/the-nix-way/dev-templates synced 2025-08-21 01:44:29 +02:00
Dev environments for numerous languages based on Nix flakes
Go to file
2025-08-05 12:53:28 +01:00
.github Remove obsolete formatting check command 2025-08-05 12:30:34 +01:00
bun Update all inputs 2025-08-05 12:28:27 +01:00
c-cpp Update all inputs 2025-08-05 12:28:27 +01:00
clojure Update all inputs 2025-08-05 12:28:27 +01:00
cue Update all inputs 2025-08-05 12:28:27 +01:00
dhall Update all inputs 2025-08-05 12:28:27 +01:00
elixir Remove now-obsolete apple_sdk packages 2025-08-05 12:42:26 +01:00
elm Update all inputs 2025-08-05 12:28:27 +01:00
empty Update all inputs 2025-08-05 12:28:27 +01:00
gleam Update all inputs 2025-08-05 12:28:27 +01:00
go Update all inputs 2025-08-05 12:28:27 +01:00
hashi Update all inputs 2025-08-05 12:28:27 +01:00
haskell Update all inputs 2025-08-05 12:28:27 +01:00
haxe Update all inputs 2025-08-05 12:28:27 +01:00
java Update all inputs 2025-08-05 12:28:27 +01:00
jupyter Update all inputs 2025-08-05 12:28:27 +01:00
kotlin Update all inputs 2025-08-05 12:28:27 +01:00
latex Update all inputs 2025-08-05 12:28:27 +01:00
lean4 Update all inputs 2025-08-05 12:28:27 +01:00
nickel Update all inputs 2025-08-05 12:28:27 +01:00
nim Update all inputs 2025-08-05 12:28:27 +01:00
nix Update all inputs 2025-08-05 12:28:27 +01:00
node Update all inputs 2025-08-05 12:28:27 +01:00
ocaml Update all inputs 2025-08-05 12:28:27 +01:00
odin Update all inputs 2025-08-05 12:28:27 +01:00
opa Update all inputs 2025-08-05 12:28:27 +01:00
php Update all inputs 2025-08-05 12:28:27 +01:00
platformio Update all inputs 2025-08-05 12:28:27 +01:00
protobuf Update all inputs 2025-08-05 12:28:27 +01:00
pulumi Update all inputs 2025-08-05 12:28:27 +01:00
purescript Update all inputs 2025-08-05 12:28:27 +01:00
python Update all inputs 2025-08-05 12:28:27 +01:00
r Update all inputs 2025-08-05 12:28:27 +01:00
ruby Update all inputs 2025-08-05 12:28:27 +01:00
rust Use GitHub ref for fenix input 2025-08-05 12:53:28 +01:00
scala Update all inputs 2025-08-05 12:28:27 +01:00
shell Update all inputs 2025-08-05 12:28:27 +01:00
swi-prolog Update all inputs 2025-08-05 12:28:27 +01:00
swift Update all inputs 2025-08-05 12:28:27 +01:00
typst Add Typst development environment 2025-08-05 12:22:39 +01:00
vlang Update all inputs 2025-08-05 12:28:27 +01:00
zig Update all inputs 2025-08-05 12:28:27 +01:00
.editorconfig Add editorconfig file 2022-07-12 02:01:42 +02:00
.envrc Update clojure and csharp 2023-07-13 15:15:22 -07:00
.gitignore Add dvt script to flake outputs 2022-10-21 11:12:21 +02:00
flake.lock Update all inputs 2025-08-05 12:28:27 +01:00
flake.nix Remove rust-toolchain template 2025-08-05 12:52:19 +01:00
README.md Add Typst development environment 2025-08-05 12:22:39 +01:00

Nix flake templates for easy dev environments

built with nix

To initialize (where ${ENV} is listed in the table below):

nix flake init --template "https://flakehub.com/f/the-nix-way/dev-templates/*#${ENV}"

Here's an example (for the rust template):

# Initialize in the current project
nix flake init --template "https://flakehub.com/f/the-nix-way/dev-templates/*#rust"

# Create a new project
nix flake new --template "https://flakehub.com/f/the-nix-way/dev-templates/*#rust" ${NEW_PROJECT_DIRECTORY}

How to use the templates

Once your preferred template has been initialized, you can use the provided shell in two ways:

  1. If you have nix-direnv installed, you can initialize the environment by running direnv allow.
  2. If you don't have nix-direnv installed, you can run nix develop to open up the Nix-defined shell.

Available templates

Language/framework/tool Template
Bun bun
C/C++ c-cpp
Clojure clojure
Cue cue
Dhall dhall
Elixir elixir
Elm elm
Empty (change at will) empty
Gleam gleam
Go go
Hashicorp tools hashi
Haskell haskell
Haxe haxe
Java java
Jupyter jupyter
Kotlin kotlin
LaTeX latex
Nickel nickel
Nim nim
Nix nix
Node.js node
OCaml ocaml
Odin odin
Open Policy Agent opa
PHP php
PlatformIO platformio
Protobuf protobuf
Pulumi pulumi
Purescript purescript
Python python
R r
Ruby ruby
Rust rust
Rust from toolchain file rust-toolchain
Scala scala
Shell shell
SWI-prolog swi-prolog
Swift swift
Typst typst
Vlang vlang
Zig zig

Template contents

The sections below list what each template includes. In all cases, you're free to add and remove packages as you see fit; the templates are just boilerplate.

bun

c-cpp

clojure

cue

dhall

elixir

elm

Empty

A dev template that's fully customizable.

gleam

go

hashi

haskell

haxe

java

jupyter

kotlin

latex

lean4

nickel

nim

nix

node

ocaml

odin

opa

php

platformio

protobuf

pulumi

purescript

python

r

ruby

  • Ruby, plus the standard Ruby tools (bundle, gem, etc.)

rust

  • Rust, including cargo, Clippy, and the other standard tools. The Rust version is determined as follows, in order:

    • From the rust-toolchain.toml file if present
    • From the rust-toolchain file if present
    • Version 1.78.0 if neither is present
  • rust-analyzer

  • cargo-edit

  • cargo-deny

scala

shell

swi-prolog

swift

typst

vlang

zig