2019-12-15 16:26:36 +00:00
|
|
|
{ pkgs ? import <nixpkgs> }: {
|
|
|
|
syncthing = {
|
2019-12-15 20:36:45 +00:00
|
|
|
declarativeWith = hosts: path:
|
2019-12-15 16:26:36 +00:00
|
|
|
let
|
|
|
|
folderContent = { devices = hosts; };
|
2019-12-15 20:36:45 +00:00
|
|
|
rootFolder = path;
|
2019-12-15 16:26:36 +00:00
|
|
|
devices = {
|
2019-12-15 20:36:45 +00:00
|
|
|
apollo = {
|
|
|
|
id =
|
|
|
|
"BOTTTGS-QQUHWAK-IFBT3T2-HGHHUZ7-QHRZXC7-JC42VT7-67ZOJBE-WHDWEQX";
|
|
|
|
};
|
2019-12-15 16:26:36 +00:00
|
|
|
hera = {
|
2019-12-15 20:36:45 +00:00
|
|
|
addresses = [ "tcp6://hera.m-0.eu" ];
|
2019-12-15 16:26:36 +00:00
|
|
|
id =
|
|
|
|
"TJHVUM6-RTB6V3D-JF4GIB2-TVDF2ST-5MTN6N2-ZDIWGF7-XZUCCFG-EQG5WA6";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
devices = pkgs.lib.getAttrs hosts devices;
|
|
|
|
folders = {
|
|
|
|
"${rootFolder}/science" = folderContent;
|
|
|
|
"${rootFolder}/documents" = folderContent;
|
|
|
|
"${rootFolder}/audio" = folderContent;
|
|
|
|
"${rootFolder}/video" = folderContent;
|
|
|
|
"${rootFolder}/images" = folderContent;
|
2019-12-15 20:36:45 +00:00
|
|
|
"${rootFolder}/books" = folderContent;
|
2019-12-15 16:26:36 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|