| 
									
										
										
										
											2022-06-26 15:34:21 +02:00
										 |  |  | { config, ... }: | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2022-11-29 17:05:49 +01:00
										 |  |  |   sops.secrets."syncthing/key" = { }; | 
					
						
							|  |  |  |   sops.secrets."syncthing/cert" = { }; | 
					
						
							| 
									
										
										
										
											2022-06-26 15:34:21 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-02 18:27:51 +02:00
										 |  |  |   # make sure folders exist writable | 
					
						
							|  |  |  |   systemd.tmpfiles.rules = [ | 
					
						
							| 
									
										
										
										
											2023-10-16 23:12:26 +02:00
										 |  |  |     "d /data/ 0755 syncthing syncthing" | 
					
						
							|  |  |  |     "d /data/computer 0755 syncthing syncthing" | 
					
						
							|  |  |  |     "d /data/phone 0755 syncthing syncthing" | 
					
						
							|  |  |  |     "d /data/music 0755 syncthing syncthing" | 
					
						
							|  |  |  |     "d /data/photos 0755 syncthing syncthing" | 
					
						
							| 
									
										
										
										
											2023-09-02 18:27:51 +02:00
										 |  |  |   ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-26 15:34:21 +02:00
										 |  |  |   services.syncthing = { | 
					
						
							|  |  |  |     enable = true; | 
					
						
							|  |  |  |     openDefaultPorts = true; | 
					
						
							| 
									
										
										
										
											2022-11-29 17:05:49 +01:00
										 |  |  |     key = config.sops.secrets."syncthing/key".path; | 
					
						
							|  |  |  |     cert = config.sops.secrets."syncthing/cert".path; | 
					
						
							| 
									
										
										
										
											2023-11-13 20:36:31 +01:00
										 |  |  |     settings = { | 
					
						
							| 
									
										
										
										
											2022-06-26 15:34:21 +02:00
										 |  |  |       options = { | 
					
						
							|  |  |  |         localAnnounceEnabled = false; | 
					
						
							| 
									
										
										
										
											2023-01-12 23:21:42 +01:00
										 |  |  |         urAccepted = 3; | 
					
						
							| 
									
										
										
										
											2022-06-26 15:34:21 +02:00
										 |  |  |       }; | 
					
						
							| 
									
										
										
										
											2023-11-13 20:36:31 +01:00
										 |  |  |       devices = { | 
					
						
							|  |  |  |         "thinkman" = { | 
					
						
							|  |  |  |           id = "KXSCPX3-JCCFZM4-S2LQZZL-3AM6WRL-IPNWVG2-IB5FEDJ-YYFUIRR-VMDO3AL"; | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  |         "birdman" = { | 
					
						
							|  |  |  |           id = "34Z4J7W-MJIODUD-J6LDJY6-QILQLLB-CJ4GR7K-7TJM2K3-R7SIPRV-XQO5TAI"; | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  |         "serverle" = { | 
					
						
							|  |  |  |           id = "PVPEIN7-PI226LR-ULSBYKT-JGRQ3PS-WSPLGBP-TKYRJVP-OTWE7IV-NLKTBA3"; | 
					
						
							|  |  |  |         }; | 
					
						
							| 
									
										
										
										
											2022-07-03 10:51:43 +02:00
										 |  |  |       }; | 
					
						
							| 
									
										
										
										
											2023-11-13 20:36:31 +01:00
										 |  |  |       folders = { | 
					
						
							|  |  |  |         "Computer" = { | 
					
						
							|  |  |  |           id = "djdxo-1akub"; | 
					
						
							|  |  |  |           path = "/data/computer"; | 
					
						
							|  |  |  |           devices = [ | 
					
						
							|  |  |  |             "thinkman" | 
					
						
							|  |  |  |             "birdman" | 
					
						
							|  |  |  |             "serverle" | 
					
						
							|  |  |  |           ]; | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  |         "Phone" = { | 
					
						
							|  |  |  |           id = "4hds7-gpypp"; | 
					
						
							|  |  |  |           path = "/data/phone"; | 
					
						
							|  |  |  |           devices = [ | 
					
						
							|  |  |  |             "thinkman" | 
					
						
							|  |  |  |             "birdman" | 
					
						
							|  |  |  |             "serverle" | 
					
						
							|  |  |  |           ]; | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  |         "Music" = { | 
					
						
							|  |  |  |           id = "mphdq-n6q7y"; | 
					
						
							|  |  |  |           path = "/data/music"; | 
					
						
							|  |  |  |           fsWatcherEnabled = false; | 
					
						
							|  |  |  |           devices = [ | 
					
						
							|  |  |  |             "thinkman" | 
					
						
							|  |  |  |             "birdman" | 
					
						
							|  |  |  |             "serverle" | 
					
						
							|  |  |  |           ]; | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  |         "Pictures" = { | 
					
						
							|  |  |  |           id = "cujyo-yiabu"; | 
					
						
							|  |  |  |           path = "/data/photos"; | 
					
						
							|  |  |  |           fsWatcherEnabled = false; | 
					
						
							|  |  |  |           devices = [ | 
					
						
							|  |  |  |             "thinkman" | 
					
						
							|  |  |  |             "serverle" | 
					
						
							|  |  |  |           ]; | 
					
						
							|  |  |  |         }; | 
					
						
							| 
									
										
										
										
											2022-06-26 15:34:21 +02:00
										 |  |  |       }; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |