Hi, I’m getting an error when trying to update my home-manager install.
$ nix-channel --update && home-manager switch
unpacking channels...
error: attribute 'defaultOverridePriority' missing
at /home/haemin/.nix-defexpr/channels/home-manager/modules/misc/nixpkgs.nix:134:25:
133| # `_pkgs`, see https://github.com/nix-community/home-manager/pull/993
134| pkgs = mkOverride modules.defaultOverridePriority _pkgs;
| ^
135| pkgs_i686 =
(use '--show-trace' to show detailed location information)
since PR (Clean up deprecated lib functions by ncfavier · Pull Request #4068 · nix-community/home-manager · GitHub).
The parent commit in master (2bbfc3a78afb4ea60345a5660d8d4173da66c884) is fine.
I have a suspicion that this is due to my nix install being old but I’m unsure how to fix this.
$ nix --version
nix (Nix) 2.11.1
$ which nix
/nix/var/nix/profiles/default/bin/nix
Whatever I do in home-manger doesn’t seem to touch /nix/var/nix/profiles/default/bin directory, which is in my PATH (since my nix install? I don’t know).
Could someone help me out to
- verify it’s actually my old nix install that’s causing the problem
- share a link to how to update this nix install
I’ve tried this page: Upgrading Nix - Nix Reference Manual
$ nix-env --install --attr nixpkgs.nix nixpkgs.cacert; systemctl daemon-reload; systemctl restart nix-daemon
installing 'nix-2.11.0'
installing 'nss-cacert-3.83'
building '/nix/store/yhg4dccsa62lcxvhb5bac8hz2nbxqbf8-user-environment.drv'...
error: files '/nix/store/96jbphsyf2dhrqpc3acyshaj2smx2fw0-home-manager-path/bin/nix' and '/nix/store/3qilwj844f5wz18mh0lc6ffzj4gcca02-nix-2.11.0/bin/nix' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' or type 'nix profile install --help' if using 'nix profile' to find out howto change the priority of one of the conflicting packages (0 being the highest priority)
error: builder for '/nix/store/yhg4dccsa62lcxvhb5bac8hz2nbxqbf8-user-environment.drv' failed with exit code 1;
last 1 log lines:
> error: files '/nix/store/96jbphsyf2dhrqpc3acyshaj2smx2fw0-home-manager-path/bin/nix' and '/nix/store/3qilwj844f5wz18mh0lc6ffzj4gcca02-nix-2.11.0/bin/nix' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' or type 'nix profile install --help' if using 'nix profile' to find out howto change the priority of one of the conflicting packages (0 being the highest priority)
For full logs, run 'nix log /nix/store/yhg4dccsa62lcxvhb5bac8hz2nbxqbf8-user-environment.drv'.
(It is very strange that it’s trying to install nix-2.11.0)
- or if I’m completely looking at a wrong place, point me to a right direction?
Additional details
$ nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/2bbfc3a78afb4ea60345a5660d8d4173da66c884.tar.gz
unstable https://nixos.org/channels/nixpkgs-unstable
$ uname -a
Linux haemin-TFX4270H 6.3.2-1-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 6.3-1ubuntu1~jammy (2023-05-13) x86_64 x86_64 x86_64 GNU/Linux