srid / nixos-flake

A flake-parts module to manage NixOS and macOS machines, along with home-manager support, in a unified fashion.
https://community.flake.parts/nixos-flake
MIT License
175 stars 19 forks source link

Documentation how to use overlays #24

Open teutat3s opened 1 year ago

teutat3s commented 1 year ago

Thank you for these useful templates!

I'd like to use a nixpkgs overlay with this (use a different version of nix). Do you have an example how to use overlays with these templates? In my case I use mkARMMacosSystem.

I'd like to apply the following overlay to nixpkgs:

final: prev: {
  nix = final.nixVersions.nix_2_16;
}
srid commented 1 year ago

Happy to accept a docs PR for this, but this is what it looks like:

https://github.com/srid/nixos-config/blob/17a7452602a9e0c9b8b35e8df91795003b1a051a/flake.nix#L88-L93

image
srid commented 1 year ago

That said, if all you want is to use a different version of Nix, you probably want to set nix.package.