Nix

Declarative builds and deployments

Resources

Setup

# ubuntu
wget --https-only -qO- https://nixos.org/nix/install | sh -s -- --daemon

# macos
curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh

Examples

# hello world
nix-shell -p cowsay lolcat
nix-shell -p git --run "git --version" --pure

# cleanup
nix-collect-garbage

# reproducible interpreted scripts i.e. shebang scripts
chmod +x nix/nixpkgs-releases.sh
./nix/nixpkgs-releases.sh