nixos-config/host/Rias/modules/syncthing.nix

39 lines
965 B
Nix
Raw Normal View History

2024-12-17 14:22:31 +03:00
{ config, ... }: {
services.syncthing = {
enable = true;
openDefaultPorts = true;
user = "sweetbread";
dataDir = "/home/sweetbread/.config/syncthing";
key = config.sops.secrets.syncthing_key.path;
cert = config.sops.secrets.syncthing_cert.path;
settings = {
devices = {
Akeno = { id = "YVFVE2M-GSCKJBJ-AMC5JM3-AOMCVNP-RLFAWEZ-35VP4HP-DGP5QD2-6QWEZQW"; };
2024-12-23 21:47:51 +03:00
Koneko = { id = "PJFWQRY-ZFUBGDR-NV7KVBL-UBDQ4HT-KPTYP34-MUDFPJU-4EZUHTT-ZLYRMAB"; };
2024-12-17 14:22:31 +03:00
};
folders = {
"Books" = {
path = "/mnt/D/SyncThing/Books";
2024-12-23 21:47:51 +03:00
devices = [ "Akeno" "Koneko" ];
2024-12-17 14:22:31 +03:00
};
".RPI" = {
path = "/mnt/D/SyncThing/.RPI";
2024-12-23 21:47:51 +03:00
devices = [ "Akeno" "Koneko" ];
2024-12-17 14:22:31 +03:00
};
"Music" = {
path = "/home/sweetbread/Music";
2024-12-23 21:47:51 +03:00
devices = [ "Akeno" "Koneko" ];
2024-12-17 14:22:31 +03:00
};
};
};
};
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
}