Skip to content

ciderale/nix-nada

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix-Nada: Reproducible Environment with nix

Usage: Initial project setup

$ mkdir project
$ cd project
$ nix-init
$ direnv allow

# creates: .envrc, default.nix, shell.nix, nixpkgs/default.nix

Usage: Pinning remote repositories

# Update the pinned nix packages
$ nix-pinup nixpkgs/default.nix`

# Configure alternative remotes
$ nix-pinning nixos-unstable > nixpkgs/nixos.nix

One-time (system) Installation

  1. Install 'nix'
  2. Install & Configure 'direnv'
  3. Install 'nix-pinning'
$ curl https://nixos.org/nix/install | sh

$ nix-env -iA direnv
$ echo 'eval "$(direnv hook zsh)"' > ~/.zshrc

$ nix-env -f ./default.nix -iA nix-pinning

Additional helpful nix commands

  • nix repl ./default.nix (interactively exploring the packages)
  • nix search "query" (find derivation mathing query)
  • nix search -u -f ./default.nix jdk (query jdk in locally pinned repo)
  • nix-shell --pure (shell env with only declared dependencies)
  • nix-env -f ./default.nix -iA attributeName (global installation)

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published