Nixos-rebuild from an local server: is it possible?

I’m not sure if this topic’s been covered, but is it possible to run nixos-rebuild from an local server or create a local nix-channel?

My current system is about 75GBs, and I was wondering if it’s possible to store the necessary packages from my config file into a private drive, which would act as a server for other desktops. So, instead of pulling and building packages from a nix-channel, I could build it from a “private” nix-channel, hosted locally.

If this topic’s been discussed, feel free to let me know.

Thank you.

Not exactly what you ask for, but you can specify the host on which packages are built with the --build-host flag. See man nixos-rebuild for more info (on my phone now…)

You have two options:

  1. Pull:
  1. Push:

Related:

2 Likes