nix development templates
flake
Initialize flake in new or existing project with
# Initialize in existing project
nix flake init --template github:randomgoods/nix-dev#<template>
# Create a new project from template
nix flake init --template github:randomgoods/nix-dev#<template> <directory>
where <template>
can be one of the following
- ansible
- golang
- nodejs
- shell
- ziglang
The flakes use the unstable channel and package versions provided by default whenever possible. Though it is relatively simple to modify that behaviour by using another nixpkgs channel or selecting packages for specific releases.
shell
The development shell is usable in two ways
- With nix-direnv, you can enable
direnv
in the project directory withdirenv allow
- With
nix develop
you can start the shell manually