4 ms·
> Deploying is as simple as pushing a new commit and then triggering a rebuild on a specific host. Or you can forgo /etc/nixos and push from your current machi
by oever 4y ago
> Deploying is as simple as pushing a new commit and then triggering a rebuild on a specific host.
Or you can forgo /etc/nixos and push from your current machine with
nixos-rebuild switch -v --target-host machine2 --flake .#machine2
- xyzzy_plugh 4y agoThis works sometimes but cross arch builds can be problematic. I use Nix on macOS so I have to use a remote build host (or a VM).
- oever 4y agoIt's possible to push from x86_64 to aarch by setting this in the system configuration: boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; With that setting pushing from e.g. laptop to raspberry works. Nix on macOS does not have that setting, but perhaps there's an equivalent.
- kahnclusions 4y agoThis is true, if you have nixos-rebuild available on your current machine. I just use a script to run the command remotely via ssh and point to the flake in git.