From 41562a4c5d4208c583a078d06c6cc8a03e6cab1f Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 30 Apr 2020 03:02:54 +0200 Subject: [PATCH] Add Syncthing setup --- modules/datasync.nix | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/modules/datasync.nix b/modules/datasync.nix index 3e871e8..477a85d 100644 --- a/modules/datasync.nix +++ b/modules/datasync.nix @@ -30,4 +30,59 @@ }; }; }; + + # Syncthing configuration + services.syncthing = { + enable = true; + dataDir = "/home/coolneng"; + declarative = { + devices = { + zion = { id = "XABIMVG-K5RKMAF-KNC33AR-TDAVEGK-GHUIVFD-NIFCX6L-6PQXRM5-KLK2PAU"; }; + }; + folders = { + Documents = { + id = "wusdj-bfjkr"; + path = "/home/coolneng/Documents"; + devices = [ "zion" ]; + versioning = { + type = "simple"; + params = { + keep = "5"; + }; + }; + }; + + Notes = { + id = "kafhz-bfmzm"; + path = "/home/coolneng/Notes"; + devices = [ "zion" ]; + versioning = { + type = "simple"; + params = { + keep = "5"; + }; + }; + }; + + Music = { + id = "2aqt7-vpprc"; + path = "/home/coolneng/Music"; + devices = [ "zion" ]; + }; + + Photos = { + id = "mjibc-ustcg"; + path = "/home/coolneng/Photos"; + devices = [ "zion" ]; + }; + + Projects = { + id = "cjhmu-avy9v"; + type = "sendonly"; + path = "/home/coolneng/Projects"; + devices = [ "zion" ]; + }; + }; + }; + }; }