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

158 lines
4.8 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";
2022-01-09 19:22:12 +01:00
overrideDevices = lib.mkDefault true;
devices =
let
device = name: id: {
"${name}" = {
name = name;
id = id;
2023-02-16 13:52:15 +01:00
addresses = [ "tcp://${name}.private:22000" ];
2022-01-09 19:22:12 +01:00
};
};
in
{
"robi" = {
name = "robi";
id = "B6P22RF-5BC2LTZ-6GHVWRZ-5D3OLXC-D66E45Y-JEB3WYT-ZQ442WZ-5FFAMQ7";
addresses = [ "tcp://144.76.13.147:22000" ];
};
}
2022-01-17 11:57:52 +01:00
// (device "workhorse" "AFSAKB6-JLH4QAS-DSRMPI3-6PVCIHF-IIAVLPC-STPNO3Y-YRDU5NW-QD445QI")
// (device "pepe" "SZLXFW3-VTAC7UB-V2Z7CHE-3VZAYPL-6D72AK6-OCDMPZP-G4FPY5P-FL6ZVAG")
// (device "sterni" "ZFNNKPD-ZSOAYJQ-VROXXDB-5MD3UTJ-GDCNTSQ-G5POVV3-UZG5HFT-CCAU3AD")
2022-09-23 20:29:18 +02:00
// (device "mobi" "NGI7UN6-MR2YPYI-L7DGN3I-JFZU2N3-RJBJV6K-2VZVQSJ-PWLZYOK-PXZYRAF")
2022-10-19 20:57:58 +02:00
// (device "bobi" "FOJ3D27-W5OJMQR-7S77A3V-AS5BCG2-CIGWVMP-UBSVQNN-QZLHAIZ-IO7GKAE")
2023-02-13 19:00:57 +01:00
// (device "cream" "MQVKATH-THTPET5-KYAT7XX-BOIIIBA-P7OOF7Y-IWAUN53-S2VNVOY-BZWTGQK")
2023-05-12 11:17:58 +02:00
// (device "chungus" "GZGW2YW-6RRUPDN-LFAOATC-56FS7LH-YC7R32N-LVA5JUX-3LSBYOX-BFR67QZ")
2022-01-09 19:22:12 +01:00
// {
bumba = {
name = "windows-bumba";
2022-01-17 11:57:52 +01:00
id = "JS7PWTO-VKFGBUP-GNFLSWP-MGFJ2KH-HLO2LKW-V3RPCR6-PCB5SQC-42FCKQZ";
2022-01-09 19:22:12 +01:00
};
2022-01-17 11:57:52 +01:00
}
// {
2022-01-09 19:22:12 +01:00
mors = {
name = "lassulus-mors";
2022-01-17 11:57:52 +01:00
id = "ZPRS57K-YK32ROQ-7A6MRAV-VOYXQ3I-CQCXISZ-C5PCV2A-GSFLG3I-K7UGGAH";
2022-01-09 19:22:12 +01:00
addresses = [ "tcp://mors.r:22000" ];
2019-10-24 02:20:38 +02:00
};
2022-01-09 19:22:12 +01:00
};
2019-10-24 02:20:38 +02:00
2022-01-09 19:22:12 +01:00
folders = {
2019-10-25 03:03:25 +02:00
2022-01-09 19:22:12 +01:00
# needs to be on encrypted drives
# -------------------------------
private = {
enable = lib.mkDefault false;
2023-12-08 21:27:52 +01:00
#watch = lib.mkDefault false;
path = lib.mkDefault "/tmp/private";
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "pepe" "cream" "sterni" "mobi" "bobi" ];
2022-09-23 20:29:18 +02:00
versioning = {
type = "simple";
params.keep = "10";
};
};
2022-12-15 15:48:53 +01:00
art = {
enable = lib.mkDefault false;
2023-12-08 21:27:52 +01:00
#watch = lib.mkDefault false;
path = lib.mkDefault "/tmp/art";
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "pepe" "cream" "sterni" "bumba" ];
versioning = {
type = "simple";
params.keep = "2";
};
};
books = {
enable = lib.mkDefault false;
2023-12-08 21:27:52 +01:00
#watch = lib.mkDefault false;
path = lib.mkDefault "/tmp/books";
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "robi" ];
2022-12-15 15:48:53 +01:00
versioning = {
type = "simple";
params.keep = "2";
};
};
2022-09-23 20:29:18 +02:00
password-store = {
enable = lib.mkDefault false;
2023-12-08 21:27:52 +01:00
#watch = lib.mkDefault false;
path = lib.mkDefault "/tmp/password-store";
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "pepe" "cream" "sterni" "mobi" "bobi" ];
2022-01-09 19:22:12 +01:00
versioning = {
type = "simple";
params.keep = "10";
2019-11-22 11:46:39 +01:00
};
2022-01-09 19:22:12 +01:00
};
desktop = {
enable = lib.mkDefault false;
2023-12-08 21:27:52 +01:00
#watch = lib.mkDefault false;
path = lib.mkDefault "/tmp/desktop";
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "pepe" "cream" "sterni" "mobi" "bobi" ];
2022-01-09 19:22:12 +01:00
};
finance = {
enable = lib.mkDefault false;
2023-12-08 21:27:52 +01:00
#watch = lib.mkDefault false;
path = lib.mkDefault "/tmp/finance";
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "pepe" "cream" "sterni" "mobi" "bobi" ];
2022-01-09 19:22:12 +01:00
versioning = {
type = "simple";
params.keep = "10";
2019-10-24 02:20:38 +02:00
};
2022-01-09 19:22:12 +01:00
};
fotos = {
enable = lib.mkDefault false;
2023-12-08 21:27:52 +01:00
#watch = lib.mkDefault false;
path = lib.mkDefault "/tmp/fotos";
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "pepe" ];
2022-01-09 19:22:12 +01:00
versioning = {
type = "simple";
params.keep = "10";
2020-03-31 11:33:31 +02:00
};
2022-01-09 19:22:12 +01:00
};
2019-10-25 03:03:25 +02:00
2022-01-09 19:22:12 +01:00
# no need to be stored on encrypted drives
# ----------------------------------------
lost-fotos = {
enable = lib.mkDefault false;
2023-12-08 21:27:52 +01:00
#watch = lib.mkDefault false;
path = lib.mkDefault "/tmp/lost-fotos";
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "pepe" "robi" ];
2022-01-09 19:22:12 +01:00
versioning = {
type = "simple";
params.keep = "10";
2019-10-24 02:20:38 +02:00
};
2022-01-09 19:22:12 +01:00
};
2023-04-10 17:38:08 +02:00
#media = {
# enable = lib.mkDefault false;
# watch = lib.mkDefault false;
2023-05-12 11:17:58 +02:00
# devices = [ "chungus" "pepe" "robi" ];
2023-04-10 17:38:08 +02:00
#};
2022-01-17 11:57:52 +01:00
music-projects = {
2022-01-09 19:22:12 +01:00
enable = lib.mkDefault false;
2022-01-17 11:57:52 +01:00
id = "acfhu-r4t4f";
2023-12-08 21:27:52 +01:00
path = lib.mkDefault "/tmp/lost-fotos";
#watch = lib.mkDefault false;
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "pepe" "cream" "sterni" "robi" ];
2022-01-09 19:22:12 +01:00
versioning = {
type = "simple";
params.keep = "10";
2019-10-24 02:20:38 +02:00
};
2022-01-09 19:22:12 +01:00
};
2022-01-17 11:57:52 +01:00
nextcloud_backup = {
2022-01-09 19:22:12 +01:00
enable = lib.mkDefault false;
2023-12-08 21:27:52 +01:00
#watch = lib.mkDefault false;
path = lib.mkDefault "/tmp/lost-fotos";
2023-05-12 11:17:58 +02:00
devices = [ "chungus" "pepe" "robi" ];
2022-01-09 19:22:12 +01:00
versioning = {
type = "simple";
2022-01-17 11:57:52 +01:00
params.keep = "2";
2019-10-24 02:20:38 +02:00
};
2022-01-09 19:22:12 +01:00
};
2019-10-24 02:20:38 +02:00
};
};
}