Last night I deployed a new #NixOS config which declaratively specifies all Syncthing folder relationships across all systems in my fleet. The syntax remains peculiar but Nix is the most fun I’ve had experimenting with computers since the 90s.
2
Replies
·
0
Boosts
@anji Cool. That is something on my todo list. Do you have a public repo, or some posts that you used? Thanks!
@duckunix Hey! No my config isn't public but the basic configuration is really easy: https://wiki.nixos.org/wiki/Syncthing#Advanced
I did things a bit fancier by specifying devices and folders in a single place, and generating each per-host config from that. So now I have a module with:
folderStuff = {
hosts = {
deviceFoo = "~/sync/stuff";
deviceBar = "/mnt/data/stuff";
};
};
This is neat because devices all get each other's id's and their views of which devices share which folder is always consistent. If I have time to clean it up I'll see if I can share the generator module.