dotfiles/nixos/syncthing.nix

94 lines
2.5 KiB
Nix
Raw Normal View History

2022-12-19 09:09:08 +00:00
{
config,
pkgs,
inputs,
...
}: let
workstations = ["skinnyv" "foureighty" "thinky"];
workstations_plus_phone = ["OnePlus9"] ++ workstations;
2022-07-22 16:01:34 +01:00
in {
2019-11-12 22:47:38 +00:00
services.syncthing = {
enable = true;
user = "cyryl";
2022-07-22 13:18:56 +01:00
dataDir = "/home/cyryl/";
2019-11-12 22:47:38 +00:00
openDefaultPorts = true;
2022-03-10 12:25:23 +00:00
package =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".syncthing;
2022-07-22 14:37:57 +01:00
overrideDevices = false;
devices = {
"OnePlus9" = {
id = "2UVDAHX-IWQEBLF-6VOYLWO-MYQBMO2-62QPM76-CFYPPZW-CWVIBZF-JEUS4QZ";
};
2022-07-22 16:01:34 +01:00
"skinnyv" = {
2022-07-22 20:35:49 +01:00
id = "SUNR6EL-UBSLEE6-CZOSGIL-D527FQG-BXL2PMA-ISEQHMV-2CXKKPD-U7GERQB";
2022-07-22 16:01:34 +01:00
};
"foureighty" = {
id = "Q4AA3LA-QIMMBNK-QWKW2AL-5SRGBU3-RYWD5EH-GKMVXRT-XVYFU3R-UYAAMAH";
};
"hagath" = {
id = "SXQA3TX-3G5T4CQ-3SX42KJ-UEBZWF7-RL66ORF-DVV6ROT-PYTE6QV-EARKMQU";
};
2022-09-26 10:46:28 +01:00
"thinky" = {
id = "G6SYM4M-32SHELZ-E4IDW3L-3MAOZ54-N7FB5BD-ZNUFXYW-2JVV6GB-LQHNRAF";
};
2022-07-22 14:37:57 +01:00
};
folders = {
"/home/cyryl/vaults" = {
id = "vaults";
label = "vaults";
2022-12-19 09:09:08 +00:00
devices = workstations_plus_phone ++ ["hagath"];
2022-07-22 14:37:57 +01:00
};
"/home/cyryl/documents" = {
id = "documents";
label = "documents";
2022-12-19 09:09:08 +00:00
devices = workstations_plus_phone ++ ["hagath"];
2022-07-22 14:37:57 +01:00
};
"/home/cyryl/camera" = {
id = "camera";
label = "camera";
2022-07-22 16:01:34 +01:00
devices = workstations_plus_phone;
};
"/home/cyryl/ISOs" = {
id = "isos";
label = "ISOs";
devices = workstations;
};
"/home/cyryl/rpg" = {
id = "rpg";
label = "rpg";
devices = workstations;
};
"/home/cyryl/music" = {
id = "music";
label = "music";
devices = workstations;
};
"/home/cyryl/photos" = {
id = "photos";
label = "photos";
2022-12-19 09:09:08 +00:00
devices = workstations ++ ["hagath"];
2022-07-22 16:01:34 +01:00
};
"/home/cyryl/gopro" = {
id = "gopro";
label = "gopro";
devices = workstations;
};
"/home/cyryl/videos" = {
id = "videos";
label = "videos";
2022-12-19 09:09:08 +00:00
devices = workstations ++ ["hagath"];
2022-07-22 14:37:57 +01:00
};
};
2022-07-22 13:18:56 +01:00
extraOptions = {
options = {
listenAddresses = [
"tcp://${config.networking.hostName}.raptor-carp.ts.net:22000"
"quic://${config.networking.hostName}.raptor-carp.ts.net:22000"
"relay://vpsfree1.raptor-carp.ts.net:22067/?id=BVJ54DH-VCLK4C7-SKNGOZP-36K76IE-UEEKLVF-WA5QHN6-6TK2ICW-HSDI6Q7"
"dynamic+https://relays.syncthing.net/endpoint"
];
};
};
2019-11-12 22:47:38 +00:00
};
}