blob: c4739d6c2dae0d059bb1af5faa37b58893e3fc9f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{ config, pkgs, lib, ... }:
let
cfg = config.my.services.syncthing;
secrets = config.age.secrets;
in {
options.my.services.syncthing = with lib; {
enable = mkEnableOption "syncthing service";
};
config = lib.mkIf cfg.enable {
services.syncthing = {
enable = true;
openDefaultPorts = true;
user = "fcuny";
group = "users";
dataDir = "/home/fcuny/.local/state/syncthing";
cert = secrets."syncthing/cert".path;
key = secrets."syncthing/key".path;
folders.Sync = {
path = "/home/fcuny/documents";
devices = [ "tahoe" ];
};
folders.PixelCamera = {
path = "/home/fcuny/media/pixel/camera";
id = "pixel_5_vwsr-photos";
devices = lib.attrNames config.services.syncthing.devices;
};
devices = {
aptos = {
id =
"JAN5UMH-2FAQQ7S-KLQ2YXM-C7KKK7U-HVHUK7I-CWOZQRM-VLQSO63-ZTP4WAN";
introducer = false;
};
tahoe = {
id =
"4Y36C3Y-LUTO6LD-JXNV73B-FLXSTNP-5Q3CSPY-HESHTPH-EDYA54K-WEICJAJ";
introducer = true;
};
pixel = {
id =
"J3JQFCJ-MY5RCF7-4NXMVU5-2JECKWO-UHFUS5T-KO64EMB-RNUV4F2-ZQ7Z6A6";
introducer = false;
};
};
};
};
}
|