Below you will find pages that utilize the taxonomy term “Nix”
nix resources
Table of Contents
the biggest hurdle in getting into nix is having the revelvant documentation available. This page is just another collection of useful resources to support success.
nix
nix the language
nixhub https://www.nixhub.io/packages/mysql
newer documentation https://nix.dev/
nix-search-cli https://github.com/peterldowns/nix-search-cli
nix-pills: Interesting information if you want to know how nix works. A little dated. https://nixos.org/nixos/nix-pills
nix packge versions - https://lazamar.co.uk/nix-versions/
nix tip: nvd to see what is going to change
have you ever wanted to see what packages are going to change before updating them on nix?
Well read on to find out how to do this with home-manager and nixos
First, there is a few different ways i came across
Table of Contents
A naive approach
I wondered since everything is in the nix store, why not just diff it?
nix tip: shell shabang
A feature I discovered recently is that nix-shell can be used as an interpreter
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash htop
echo hello world
which htop
It even works for python
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3Packages.pillow python3Packages.ansicolor
# scale image by 50%
import sys, PIL.Image, ansicolor
path = sys.argv[1]
image = PIL.Image.open(path)
factor = 0.5
image = image.resize((round(image.width * factor), round(image.height * factor)))
path = path + ".s50.jpg"
image.save(path)
print(ansicolor.green(f"done {path}"))
Discovered on the wiki page at https://nixos.wiki/wiki/Nix-shell_shebang
nix-direnv
Table of Contents
- direnv
- nix-direnv
- Nix Shell
- Rust development environment
- Go development environment
- Nix Shell and Flakes
- Audio / Video Transcoding tools
- Photos and Videos
- Static Website
- Emacs
- hey gcroots, save some of that garbage!
- References
direnv
The power of nix with direnv is easy to understate. This post is to explains some ways to use it.
direnv is a nice tool to use which allows you to load the appropriate environment variables when you cd to a specific directory. supported shells are bash, zsh, tcsh, fish, elvish, and powershell.
nix and nixos
Table of Contents
- Summary
- Why NixOS
- NixOS
- Home Manager
- Build Docker Containers
- Development Shells
- Nix Cache
- Flakes
- Resources
Summary
Nix is difficult to learn but the promises are appealing with a bit of effort. The effort required may not be worth it to some people.
Nix overall has so many features that it’s worth understanding what’s possible
with nix you can