I want to trigger
nixos-rebuild switch remotely, using a local file from a Darwin machine. For the purpose of tinkering with an existing NixOS machine on the network, NixOps is overkill. If I were on Linux, I’d just run
nixos-rebuild switch --target-host=<target> configuration.nix
but Darwin naturally does not have
nixos-rebuild. Did anybody try something like this already? Will
nix complain about the platform even if the target is Linux?
More generally, how do I get an executable from a package in a NixOS module to run on Darwin (assuming all dependencies are compatible)? Do I really have to trick the NixOS tools module into outputting a package that I can capture for my purposes by supplying arguments that are convincing enough?