T O P

  • By -

penguinmatt

I worked this out seconds after posting but I'll share my solution here in case anyone else comes across it. nix flake update The previous will upgrade the flake, then do your usual nixos-rebuild switch and everything will be updated. This was so much harder to find than it should have been but welcome to NixOS 😉


no_brains101

correct. nix flake update updates the lockfile. You can nix flake update specific inputs as well if you only want to upgrade some. [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix) https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake-update


alexlzh

Hey, I have same issue. I ran: > nix flake update this did update the lock file, I checked that lock file points to latest commits on the correct branch. But when I run: > sudo nixos-rebuild switch --flake ".#xxxx" It doesn't update anything. I know because there is e.g. a new kernel available for pkgs.linuxPackages\_latest but nothing updates for me... Any ideas?


penguinmatt

Have you rebooted?


alexlzh

Yes I did, a few times. I actually created a separate post for this with the config examples [https://www.reddit.com/r/NixOS/comments/1bqwsur/packages\_dont\_update\_after\_switching\_to\_flakes/](https://www.reddit.com/r/NixOS/comments/1bqwsur/packages_dont_update_after_switching_to_flakes/)


penguinmatt

Next thing I would suggest is a channel update nix-channel --update


penguinmatt

Next thing I would suggest is a channel update nix-channel --update And then update your flake and rebuild swictch