nixos-config/system/all/syncthing.nix

174 lines
5.1 KiB
Nix
Raw Normal View History

2019-10-24 02:20:38 +02:00
{ config, lib, pkgs, ... }:
2019-12-20 05:54:26 +01:00
with lib; {
2019-10-24 02:20:38 +02:00
test.services.syncthing = {
2019-10-24 02:20:38 +02:00
guiAddress = "${config.networking.hostName}.private:8384";
declarative = {
overrideDevices = true;
devices = let
2019-12-20 05:54:26 +01:00
device = name: id: {
2019-10-24 02:20:38 +02:00
"${name}" = {
name = name;
id = id;
2019-12-20 05:54:26 +01:00
addresses =
[ "tcp://${name}.private:22000" "tcp://${name}.private:21027" ];
2019-10-24 02:20:38 +02:00
};
};
2019-12-20 05:54:26 +01:00
in (device "workhorse"
"AFSAKB6-JLH4QAS-DSRMPI3-6PVCIHF-IIAVLPC-STPNO3Y-YRDU5NW-QD445QI")
// (device "pepe"
"SZLXFW3-VTAC7UB-V2Z7CHE-3VZAYPL-6D72AK6-OCDMPZP-G4FPY5P-FL6ZVAG")
// (device "workout"
"DZOOAKG-GI2SVOS-QEVMFL7-TRHVTPQ-ADIJEVH-RH5WV3J-6M7MJHC-C53EOAC")
// (device "sterni"
"ZFNNKPD-ZSOAYJQ-VROXXDB-5MD3UTJ-GDCNTSQ-G5POVV3-UZG5HFT-CCAU3AD") // {
2020-02-03 05:21:27 +01:00
"porani" = {
name = "porani";
id =
"6YOIA4E-X52ZD5Z-FPNWPRS-77QIMMU-VDIXVZB-6BPQN7A-FFJDU4W-EXEGFAI";
addresses =
[ "tcp://porani.insecure:22000" "tcp://porani.insecure:21027" ];
};
} // {
2019-12-20 05:54:26 +01:00
smartphone = {
name = "smartphone";
id =
"PRCA4KO-PEMLUSO-ERUSKAP-GUDSW2I-AYTEB54-E5JJOXJ-23X2UYP-RLSMKQM";
addresses = [ "dynamic" ];
};
} // {
bumba = {
name = "windows-bumba";
id =
"JS7PWTO-VKFGBUP-GNFLSWP-MGFJ2KH-HLO2LKW-V3RPCR6-PCB5SQC-42FCKQZ";
addresses = [ "dynamic" ];
};
} // {
mors = {
name = "lassulus-mors";
id =
"ZPRS57K-YK32ROQ-7A6MRAV-VOYXQ3I-CQCXISZ-C5PCV2A-GSFLG3I-K7UGGAH";
addresses = [ "tcp://mors.r:22000" ];
};
2019-10-24 02:20:38 +02:00
};
folders = {
2019-10-25 03:03:25 +02:00
# needs to be on encrypted drives
# -------------------------------
2019-11-22 11:46:39 +01:00
private = {
enable = lib.mkDefault false;
watch = false;
2020-01-31 10:40:14 +01:00
devices = [ "workout" "workhorse" "pepe" "sterni" ];
2019-11-22 11:46:39 +01:00
};
2019-10-25 03:03:25 +02:00
desktop = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
watch = false;
2020-01-31 10:40:14 +01:00
devices = [ "workout" "workhorse" "pepe" "sterni" ];
2019-10-24 02:20:38 +02:00
};
2019-10-25 03:03:25 +02:00
finance = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
watch = false;
2020-01-31 10:40:14 +01:00
devices = [ "workout" "workhorse" "pepe" "sterni" ];
2019-10-24 02:20:38 +02:00
};
fotos = {
enable = lib.mkDefault false;
watch = false;
2020-01-31 10:40:14 +01:00
devices = [ "workout" "workhorse" "pepe" "sterni" ];
};
2019-10-25 03:03:25 +02:00
# no need to be stored on encrypted drives
# ----------------------------------------
book = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-25 03:03:25 +02:00
id = "wwbvs-5lfbh";
2019-10-24 02:20:38 +02:00
watch = false;
2019-10-25 03:03:25 +02:00
devices = [ "workout" "pepe" "sterni" ];
2019-10-24 02:20:38 +02:00
};
2019-10-25 03:03:25 +02:00
lost-fotos = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
watch = false;
devices = [ "workout" "workhorse" ];
2019-10-24 02:20:38 +02:00
};
movies = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
id = "vatmy-c2qf4";
watch = false;
devices = [ "workhorse" "porani" ];
};
porn = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
watch = false;
2020-02-06 22:29:54 +01:00
devices = [ "workhorse" ];
2019-10-24 02:20:38 +02:00
};
music-library = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
id = "gytmq-r2zrx";
watch = false;
devices = [ "porani" "workout" "workhorse" "pepe" "sterni" ];
};
music-library-free = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
id = "mu9mn-zgvsw";
watch = false;
devices = [ "workout" "workhorse" "mors" ];
};
music-projects = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
id = "acfhu-r4t4f";
watch = false;
devices = [ "workout" "workhorse" "pepe" "sterni" ];
};
2020-03-14 19:29:50 +01:00
smartphone-folder = {
enable = lib.mkDefault false;
watch = false;
devices = [ "workout" "workhorse" "sterni" "smartphone" ];
2020-03-14 19:29:50 +01:00
};
2019-10-24 02:20:38 +02:00
podcasts = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
id = "yvzmx-hcomd";
watch = false;
devices = [ "workhorse" "porani" ];
};
samples = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
id = "pcgkj-tjucd";
watch = false;
devices = [ "workout" "workhorse" "sterni" ];
};
series = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
id = "all-series";
watch = false;
devices = [ "workhorse" "porani" ];
};
video-material = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
id = "wgkun-fec5h";
watch = false;
devices = [ "workout" "workhorse" ];
};
windows-sync = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
id = "hcity-p5ikc";
watch = false;
2019-10-25 08:17:56 +02:00
devices = [ "bumba" "workout" ];
2019-10-24 02:20:38 +02:00
};
workout-pepe = {
2019-10-26 13:44:27 +02:00
enable = lib.mkDefault false;
2019-10-24 02:20:38 +02:00
devices = [ "pepe" "workout" ];
watch = false;
};
workhorse-sterni = {
enable = lib.mkDefault false;
devices = [ "workhorse" "sterni" ];
watch = false;
};
2019-10-24 02:20:38 +02:00
};
};
};
}