My packages don't update with home-manager

I’m using home-manager on mac. I cannot get packages to update to the same version on unstable.

$ nix-channel --list                                                            

home-manager https://github.com/nix-community/home-manager/archive/master.tar.gz
nixpkgs https://nixos.org/channels/nixpkgs-unstable
nixpkgs-unstable https://nixos.org/channels/nixpkgs-unstable

~/.config/home-manager/home.nix

{ config, pkgs, ... }:

let

  pkgsUnstable = import <nixpkgs-unstable> {};

in

{
  home.stateVersion = "24.11"; 

  home.packages = [
    pkgs.yt-dlp 
    pkgsUnstable.uv 
  ]
...

After I run

nix-channel --update
home-manager switch

I’d expect both yt-dlp and uv to update to latest version. But instead:

$ uv --version
yt-uv 0.6.10 # correct
$ yt-dlp --version
2025.02.19 # unstable should be 2025.3.26

How can I get the packages to update without specifying pkgsUnstable?

Can you please post the output of the following?

for c in nixos nixpkgs nixpkgs-unstable; do printf "%s:\t%s\n" "$c" "$(nix-instantiate --eval --expr "(import <$c> {}).lib.version" 2>/dev/null)"; done
printenv NIX_PATH

Here’s the output, thanks for the help!

nixos:	
nixpkgs:	"25.05pre-git"
nixpkgs-unstable:	"25.05pre774949.6c5963357f3c"

NIX_PATH isn’t defined.

The fact that there is a pre-git in nixpkgs, makes me assume that you are using flakes and that you managed it somehow map the nixpkgs-flake-input to the nixpkgs nix path entry. This is usually done through the NIX_PATH, though if you do not define it, it would be hard to get that happen…

Do you therefore mind sharing the output of nix config show nix-path as well?

$ nix config show nix-path
nixpkgs=flake:https://flakehub.com/f/DeterminateSystems/nixpkgs-weekly/*.tar.gz

Hmm I don’t know why there is flake. How do I disable it?

Did you use the determinate nix installer? That might be why. You should be able to edit your nix.conf to remove the entry if you’d like. You may need to restart the nix daemon and relog in for it to take effect, or merely reboot.

Then you should just keep your nixpkgs channel as pointing at https://nixos.org/channels/nixpkgs-unstable and remove your nixpkgs-unstable channel.

Yes I used determinate nix installer. Thanks for the pointer to nix.conf. I’m now able to update to latest packages.

Below are the changes for the record:

vim /etc/nix/nix.custom.conf

extra-nix-path = nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz

launchctl stop systems.determinate.nix-daemon
launchctl start systems.determinate.nix-daemon