Using stable for one machine and unstable for another

I’ve been using NixOS for a few months now, and I’m thinking of switching over a home server and a VPS to NixOS as well. I’ve seen people use shared configs with flakes, and each host being a separate file. I’m wondering if it’s possible to use unstable nixpkgs on my desktop install, and stable nixpkgs on my servers, all while being in the same config repository.

I’m currently using a flake based system configuration. The ideas I’ve had so far:

  • (dirtiest) just switch out the flake.nix depending on which system
  • maybe do some overlay magic? But I’m unsure how that would look.

So I think this easier if you’re not using snowfall-lib. It should be pretty self explanatory where to change on non-snowfall (I think just changing nixpkgs here nixpkgs.lib.nixosSystem would work), but for snowfall here’s what I found Specify specific nixpkgs for an output? · Issue #54 · snowfallorg/lib · GitHub