2 ms·
> The way nix works with the way nixpkgs is structured, pinning a version of any package means pinning a commit of the entire nixpkgs tree. You can do that for
by craftkiller 1y ago
> The way nix works with the way nixpkgs is structured, pinning a version of any package means pinning a commit of the entire nixpkgs tree.
You can do that for a single package. For example, the latest version of linux-firmware is currently broken for my wifi cards so I pinned linux-firmware to commit dda3dcd3f of nixpkgs, whereas the rest of my software comes from the latest version of nixpkgs. There are multiple ways to accomplish this, but the way I did it was:
1. Add an input of a specific version of nixpkgs (which I called `nixpkgs-dda3dcd3f`): https://code.fizz.buzz/talexander/machine_setup/src/commit/eed2bd4f13fce8e1181f7d39c5c3ba49d96f1fb1/nix/configuration/flake.nix#L46 https://code.fizz.buzz/talexander/machine_setup/src/commit/e...
2. Add an "overlay" which replaces linux-firmware in the regular nixpkgs with the copy from nixpkgs-dda3dcd3f: https://code.fizz.buzz/talexander/machine_setup/src/commit/eed2bd4f13fce8e1181f7d39c5c3ba49d96f1fb1/nix/configuration/roles/network/default.nix#L99 https://code.fizz.buzz/talexander/machine_setup/src/commit/e...