Error: unknown hash algorithm -- cannot do `nix flake update`

Whenever I run nix flake update, it looks like this:


❯ nix flake update
warning: redirecting to <path to my repo>
error:
       … while updating the lock file of flake 'git+file:///<path where my config lives>?ref=refs/heads/main
&rev=<commit hash>'
       … while updating the flake input 'pub'

       error: unknown hash algorithm 'cursor'

Try 'nix --help' for more information.

searching online found me these 2 errors that look kind of similar: first, second; so I’m led to believe this is somehow about the nix version I use.

❯ nix --version
nix (Lix, like Nix) 2.95.2
System type: x86_64-linux
Additional system types: aarch64-linux, i686-linux
Features: gc, signed-caches

System configuration file: /etc/nix/nix.conf

User configuration files: /home/me/.config/nix/nix.conf:/nix/store/6rilnyr0qj4q7fd29c0blq44bi86px6b-plasma-work
space-6.7.3/etc/xdg/nix/nix.conf:/nix/store/01cjrihwdl6dhp29vzg2070shvv1ylya-kglobalacceld-6.7.3/etc/xdg/nix/nix.con
f:/nix/store/cm9sgq6pxgzm9dhqifilwjj1k2p8zxm1-baloo-6.28.0/etc/xdg/nix/nix.conf:/home/me/.config/kdedefaults/ni
x/nix.conf:/home/me/.config/kdedefaults/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/me/.nix-profile/etc/xdg/n
ix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/me/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profi
les/per-user/me/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/
etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/zmg5ayp5qpin0v4y6hfg684kvixldq0x-lix-2.95.2/share

and

❯ cat /nix/var/nix/db/schema
10%       

and

❯ nixos-version
26.11.20260715.753cc8a (Zokor)

Any idea how I can make my system useable again?

Can you share the URL of the pub flake input?

inputs = {
  pub.url = "git+https://git.catgirl.cloud/jules/blitters-nixos-config";
};

Thanks, you need to use ?ref=cursor-themes instead of ?rev=cursor-themes here and then relock the pub flake

https://git.catgirl.cloud/jules/blitters-nixos-config/-/blob/main/flake.nix?ref_type=heads#L36

1 Like

Do you mind sharing the lockfile or maybe your repo? Also does the update work using nix rather than lix?

Good catch! (Fill 20 chars)