4 ms·
How do you use syncthing for Nix builds? Do you sync your Nix code and have something watch the Nix code and rebuild in the background?
by pxc 3y ago
How do you use syncthing for Nix builds? Do you sync your Nix code and have something watch the Nix code and rebuild in the background?
- megaloblasto 3y agoI do not, although that would be cool. If I make changes to my nixos config I just type "rebuild" in the terminal on which ever computer was affected. I have "rebuild" aliased to "sudo nixos-rebuild switch --flake /home/user/nixos/#machine_name" on each machine. For example, I make a development environment on my desktop using a flake.nix file and a .envrc file in directory. I type direnv allow in that directory (actually all this is done with a script I wrote so I can just type "dev-env" in the terminal in the corresponding directory". Then open my laptop, syncthing makes it so the entire environment and all the files are already on my laptop. I type "direnv allow" in the directory in my laptop, and then "rebuild" if the NixOS configuration was changed. Then I can run the software that I wrote on the desktop.