nixos-config/nixos/system/all/syncthing.nix

233 lines
6.7 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
2020-11-21 18:56:11 +01:00
services.syncthing = {
2021-03-10 19:27:43 +01:00
guiAddress = lib.mkDefault "${config.networking.hostName}.private:8384";
2019-10-24 02:20:38 +02:00
declarative = {
2021-12-28 19:48:14 +01:00
overrideDevices = lib.mkDefault true;
2021-11-01 09:20:42 +01:00
devices =
let
device = name: id: {
"${name}" = {
name = name;
id = id;
addresses =
2021-12-28 19:48:14 +01:00
[ "tcp://${name}.private:22000" ];
2021-11-01 09:20:42 +01:00
};
2019-10-24 02:20:38 +02:00
};
2021-11-01 09:20:42 +01:00
in
2021-12-28 19:48:14 +01:00
{
"robi" = {
name = "robi";
id = "B6P22RF-5BC2LTZ-6GHVWRZ-5D3OLXC-D66E45Y-JEB3WYT-ZQ442WZ-5FFAMQ7";
addresses = [ "tcp://144.76.13.147:22000" ];
};
}
// (device "workhorse"
2021-11-01 09:20:42 +01:00
"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"
2021-12-28 19:48:14 +01:00
"ZFNNKPD-ZSOAYJQ-VROXXDB-5MD3UTJ-GDCNTSQ-G5POVV3-UZG5HFT-CCAU3AD")
// {
2020-02-03 05:21:27 +01:00
"porani" = {
name = "porani";
2021-12-28 19:48:14 +01:00
id = "6YOIA4E-X52ZD5Z-FPNWPRS-77QIMMU-VDIXVZB-6BPQN7A-FFJDU4W-EXEGFAI";
2020-02-03 05:21:27 +01:00
addresses =
2021-03-05 08:22:35 +01:00
[ "tcp://porani.secret:22000" "tcp://porani.secret:21027" ];
2020-02-03 05:21:27 +01:00
};
} // {
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" ];
versioning = {
type = "simple";
params.keep = "10";
};
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" ];
versioning = {
type = "simple";
params.keep = "10";
};
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" ];
versioning = {
type = "simple";
params.keep = "10";
};
};
2020-03-31 11:33:31 +02:00
zettlr = {
enable = lib.mkDefault false;
watch = true;
devices = [ "workout" "workhorse" "pepe" "sterni" ];
versioning = {
type = "simple";
params.keep = "10";
};
2020-03-31 11:33:31 +02:00
};
2020-10-08 21:09:35 +02:00
programs = {
enable = lib.mkDefault false;
watch = true;
devices = [ "workout" "sterni" ];
versioning = {
type = "simple";
params.keep = "1";
};
};
2019-10-25 03:03:25 +02:00
# no need to be stored on encrypted drives
# ----------------------------------------
borg-mirror = {
enable = lib.mkDefault false;
watch = false;
devices = [ "workhorse" "pepe" ];
};
2021-02-18 04:22:30 +01:00
books = {
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;
2021-12-28 19:48:14 +01:00
devices = [ "workhorse" "pepe" "sterni" "robi" ];
versioning = {
type = "simple";
params.keep = "10";
};
2019-10-24 02:20:38 +02:00
};
2020-09-01 23:42:40 +02:00
lost-fotos = {
enable = lib.mkDefault false;
watch = false;
devices = [ "workhorse" "workout" "pepe" ];
versioning = {
type = "simple";
params.keep = "10";
};
};
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;
2021-12-28 19:48:14 +01:00
devices = [ "workhorse" "pepe" "porani" "robi" ];
versioning = {
type = "simple";
params.keep = "3";
};
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;
2021-12-29 20:37:49 +01:00
devices = [ "workhorse" "pepe" "sterni" "robi" ];
versioning = {
type = "simple";
params.keep = "10";
};
2019-10-24 02:20:38 +02:00
};
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;
2020-04-10 11:36:58 +02:00
devices = [ "workout" "workhorse" "pepe" "mors" ];
2019-10-24 02:20:38 +02:00
};
2020-09-27 23:18:06 +02:00
processing = {
enable = lib.mkDefault false;
watch = false;
devices = [ "workout" "workhorse" "pepe" "sterni" ];
versioning = {
type = "simple";
params.keep = "10";
};
};
2019-10-24 02:20:38 +02:00
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" ];
versioning = {
type = "simple";
params.keep = "10";
};
2019-10-24 02:20:38 +02:00
};
2020-03-14 19:29:50 +01:00
smartphone-folder = {
enable = lib.mkDefault false;
watch = false;
2020-04-10 11:36:58 +02:00
devices = [ "workout" "workhorse" "sterni" "smartphone" "pepe" ];
2020-03-14 19:29:50 +01:00
};
2019-10-24 02:20:38 +02:00
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;
2021-12-28 19:48:14 +01:00
devices = [ "workhorse" "sterni" "pepe" "robi" ];
2019-10-24 02:20:38 +02:00
};
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;
2021-12-28 19:48:14 +01:00
devices = [ "workhorse" "porani" "pepe" "robi" ];
versioning = {
type = "simple";
params.keep = "10";
};
2019-10-24 02:20:38 +02:00
};
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;
2020-04-10 11:36:58 +02:00
devices = [ "workout" "workhorse" "pepe" ];
versioning = {
type = "simple";
params.keep = "10";
};
2019-10-24 02:20:38 +02:00
};
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
};
};
};
};
}