summaryrefslogtreecommitdiff
path: root/docs/archive/organized/cookbook/setting-hash-algorithm-to-blake3-in-nix/setting-hash-algorithm-to-blake3-in-nix.md
blob: 873649aa79c38ef87ba2c7743e4b6dcefdb6c6fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Setting the Hash Algorithm to BLAKE3 | Nixtamal

┏┓╻+╻ ╱┏┳┓┏┓┏┳┓┏┓╻

┃┃┃┃┗━┓╹┃╹┣┫┃┃┃┣┫┃

╹┗┛╹╱ ╹ ╹ ╹╹╹ ╹╹╹┗┛     Home      Install  Manpage  Changelog  Roadmap  Cookbook  Real-world showcase  Community  FAQs  Funding         Setting the Hash Algorithm to BLAKE3    Nix supports a number of hash algorithms:     MD5 (deprecated)      SHA-1 (deprecated)     SHA-256 (default)    SHA-512    BLAKE3 (experimental)    BLAKE3 support requires Nix version 2.31+ & enabling the blake3-hashes experimental feature .

This algorithm is very good with tree-like structures — like the file system, which is what Nix is often hashing.

BLAKE3 offers faster hashing & is more secure which makes it a good choice for new setups that can afford to try it out.

At the time of writing, Nix flakes does not & cannot support changing the hash algorithm away from SHA-256 for input pinning requiring an input pinner like Nixtamal to automate it.   How to use the BLAKE3 hash algorithm with Nix + Nixtamal  Let’s show the way using the WhisperFish repository’s latest commit, but you can use any input kind.  Using BLAKE3 on a single input  // manifest.kdl inputs  {  whisperfish  {  archive  {  url  "https://gitlab.com/whisperfish/whisperfish/-/archive/{{fresh-value}}/whisperfish-{{fresh-value}}.tar.bz2"   }  hash  algorithm= BLAKE3   }  fresh-cmd  {  $  git  ls-remote  --branches  main  "https://gitlab.com/whisperfish/whisperfish.git"  |  cut  -f1   }  }  Additionally, you can set BLAKE3 to be the default in the manifest file’s top level.  Project-wide default  // manifest.kdl version  "1.0.0"  default-hash-algorithm  BLAKE3       Site made with Nix ( dep management), Nickel ( config ), Soupault ( SSG ), Docutils ( rST rendering), mandoc (manpage conversion), & sugilite256 (color scheme).  © 2025–2026 toastal .

© 2026 Nixtamal contributors.

Some rights reserved.

Except where otherwise noted, the content on this website is licensed under CC-BY-SA-4.0 .

Citations must attribute the work’s writer/maker & include a hyperlink to this website (or rather the work itself).

Yes, these rules/clauses apply to LLM s & AI assistants too.