Skip to content

Templates for setting up development environment using Nix flakes

Notifications You must be signed in to change notification settings

chzerv/nix-flake-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Templates

Templates I use for setting up language-specific development environments, based on Nix flakes.

To use these templates, run:

Golang

mkdir my-go-proj && cd my-go-proj

# For Golang
nix flake init -t github:chzerv/nix-flake-templates#go

go mod init github.com/<username>/my-go-proj

Tip

# Build the project
nix build

Rust

  • Fenix for installing toolchains and rust-analyzer
  • Crane for building the project
    • Let's us build the project's dependencies in a separate step and thus, avoid rebuilding them whenever we build the project
  • Treefmt for project-wide formatting
mkdir my-crate && cd my-crate
nix flake init -t github:chzerv/nix-flake-templates#typst

cargo init
cargo generate-lockfile

Tip

# Build the project (Cargo.toml and Cargo.lock must be already generated!)
nix build

# Clippy and cargo-audit
nix flake check

# Project-wide formatting
nix fmt

Gleam

Simple template that just installs Gleam, Erlang and rebar3, according to the Gleam docs

mkdir my-gleam-proj && cd my-gleam-proj
nix flake init -t github:chzerv/nix-flake-templates#gleam

gleam new .

Terraform

mkdir my-tf-proj && cd my-tf-proj
nix flake init -t github:chzerv/nix-flake-templates#terraform

LaTeX

mkdir my-latex-proj && cd my-latex-proj
nix flake init -t github:chzerv/nix-flake-templates#latex

Typst

mkdir my-typst-proj && cd my-typst-proj
nix flake init -t github:chzerv/nix-flake-templates#typst

TODO

  • Rust
  • Python
  • Ansible
  • Terraform

About

Templates for setting up development environment using Nix flakes

Topics

Resources

Stars

Watchers

Forks