If I can read GitHub right, the patch should of been merged by now, but my update still is broken. Is it just taking a while or am I messing something up?
To avoid full rebuilds the nixos-*
channels and branches are updated when hydra finishes evaluating and building the packageset. You can check https://nixpk.gs/pr-tracker.html?pr=286084 to see when it is available in the cache.
Thanks for the info!
I have an app that I want to install and use but the build is failing because of this error. How can I do install/use the app without nvidia getting updated in the rebuild process?
Don’t update your channels/flake inputs when you install it.
If you already have, you can rollback your channels or revert git commits for a flake.
I have a similar issue. I tried converting to using Flakes, and in the build process I was met with the same problem.
Since it was my first Flake build, I have nothing to convert back to. How can I do the initial build? Will I somehow have to build using an older Linux kernel? Or, is it the NVIDIA driver that I need to somehow downgrade? Or both?
// disclaimer: i am brand new to nixos
I think we just have to wait for Hydra to take its sweet sweet time.
It would be possible to get this specific package from unstable.
However in this case I don’t know where to define it.
Pointing hardware.nvidia.package
to the unstable version of linuxKernel.packages.linux_6_1.nvidia_x11
didn’t work for me.
The alternative option is to pin the whole flake to a commit before it broke.
Yeah, if you’re using a flake, you can change the nixpkgs url to include the exact commit:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11?rev=14944a4d567c6679e6054b382cf7f309ae880f0c";
# Or if I misremember, maybe the branch is not allowed if you specify `rev`:
# nixpkgs.url = "github:NixOS/nixpkgs?rev=14944a4d567c6679e6054b382cf7f309ae880f0c";
};
}
That commit is the one that changed to the 6.1.74 kernel version, which is 2 weeks out of date.
You’ll need to remove the rev
bit manually later if you want to actually update again. Though frankly, at this point it will likely only take a few hours before hydra finishes, so it might be worth just waiting an evening.
You can use this workaround temporarily (source):
In flake.nix
:
inputs.nixpkgs_patched.url = "github:nixos/nixpkgs/468a37e6ba01c45c91460580f345d48ecdb5a4db";
In configuration.nix
:
{ config, pkgs, inputs ... }:
{
nixpkgs.overlays = [ (self: super: (let
patched_pkgs = import inputs.nixpkgs_patched {
inherit (self) system;
config.allowUnfree = true;
};
in {
linuxPackages = patched_pkgs.linuxPackages;
})) ];
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
boot.kernelPackages = pkgs.linuxPackages;
}
That will require building the kernel, by the way, until hydra publishes a binary, whereas the workaround of sticking to an older commit means you don’t have to do that.
I just applied the @Brisingr05 's workaround to my own configs and it definitely did not rebuild the full kernel. So i guess hydra already has binaries for that.
looks like the patch there is applied to the nvidia package, not the kernel. So that just means rebuilding nvidia.
Thanks for the input, guys. I am trying @Brisingr05’s workaround (my system is now downloading and building a lot of stuff).
One noob question: How do you know what URL to use in the setting below?
the number is the commit hash of the Pull Request that fixed the nvidia issue, linuxPackages.nvidiaPackages: add common patch for new kernel releases by Kiskae · Pull Request #286058 · NixOS/nixpkgs · GitHub
You could also put a branch or tag name.
Normally you would have a branch name in there, i.e. nixos-unstable
Also glad to see my super hacky fix was useful, considering it was quoted here lol
OK, I understand. However, when I look at the referenced pull request, I only see two related commits.
I see f649a4a4b749bb2b55cc3a7afc815d8df9dd62db and ca149f54a9a89414388dd97c2334ad8b8ad2bc8b. I do not see 468a37e6ba01c45c91460580f345d48ecdb5a4db
.
Am I looking at the wrong place?
nah I cant find in anymore on there either. Maybe they added another commit or something idk. ima make sure my fix even still works rn XD
you have to follow more links to find the specific one I used now…
You could use the most recent one in that pr too though, nothing special about the one I chose other than that it was after the patch
Thanks again, @Birdee.
I found the commit you chose. Makes sense, any commit after the patch was implemented will do. So, I guess I could use the latest one from the list of all the commits. Very good to know, if I run into these type of issues again later.
Flakes are amazing for pinning like this.
I use it often for neovim plugins especially.
Btw if you use neovim, I made this