system-manager-wakasu
 1{
 2  globals,
 3  hostname,
 4  libx,
 5  ...
 6}:
 7{
 8  services.syncthing = {
 9    enable = true;
10    user = "vincent";
11    # FIXME: change this
12    dataDir = "/home/vincent/.syncthing";
13    configDir = "/home/vincent/.syncthing";
14    guiAddress = libx.syncthingGuiAddress globals.machines."${hostname}";
15    overrideFolders = false; # Just in case, will probably set to true later
16    settings = {
17      # FIXME this doesn't work, I wish it did.
18      # defaults = {
19      #   ignores = { lines = [ "(?d).DS_Store" "**" ]; };
20      # };
21      devices = libx.generateSyncthingDevices hostname globals.machines;
22      folders =
23        libx.generateSyncthingFolders hostname globals.machines."${hostname}" globals.machines
24          globals.syncthingFolders;
25    };
26  };
27}