How do you pin/upgrade nixpkgs using nix-darwin?

I am using niv/nix-darwin/home-manager to manage my macbook pro. It’s great!

But I cannot figure out how to tell the nix daemon (running in multi-user mode) to use a specific version of nixpkgs. I manage it with niv right now, so I have it available as a nix expression; I just can’t figure out where to put it (or which config file to create.) As far as I can tell it’s not managed with nix-channel—I only have darwin in there. (I’d also like to pin that version in my dotfiles if anyone could tell me how, BTW!)

Here is my whole configuration so far: GitHub - BrianHicks/dotfiles.nix. Darwin stuff lives in the darwin directory, which calls home-manager config living in the dotfiles directory.

Any ideas?

1 Like