Fix syncthing config
Some ids were mixed up. Extra settings for various shares.
This commit is contained in:
parent
9cd19f1732
commit
740046f3f0
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
|
@ -11,31 +11,43 @@
|
||||||
devices = {
|
devices = {
|
||||||
kuro.id = "4UJSUBN-V7LCISG-6ZE7SBN-YPXM5FQ-CE7CD2U-W4KZC7O-4HUZZSW-6DXAGQQ";
|
kuro.id = "4UJSUBN-V7LCISG-6ZE7SBN-YPXM5FQ-CE7CD2U-W4KZC7O-4HUZZSW-6DXAGQQ";
|
||||||
shiro.id = "G4DUO25-AMQQIWS-SRZE5TJ-43CCQZJ-5ULEZBS-P2LMZZU-V5JA5CS-6X7RLQK";
|
shiro.id = "G4DUO25-AMQQIWS-SRZE5TJ-43CCQZJ-5ULEZBS-P2LMZZU-V5JA5CS-6X7RLQK";
|
||||||
aka.id = "4UJSUBN-V7LCISG-6ZE7SBN-YPXM5FQ-CE7CD2U-W4KZC7O-4HUZZSW-6DXAGQQ";
|
aka.id = "IZQ2GAC-I3QBTRT-TXBIG7Z-NT6S66Y-H64WOCO-T3AMKYZ-VGWTNCY-CTQOLQN";
|
||||||
ao.id = "PXKRUR4-EVTXROW-NHSEXBZ-H2NTNL7-EWOUDXF-P3AATC7-KATI37N-3YNQAQD";
|
ao.id = "PXKRUR4-EVTXROW-NHSEXBZ-H2NTNL7-EWOUDXF-P3AATC7-KATI37N-3YNQAQD";
|
||||||
# Windows machine; set up the other end yourself!
|
# Windows machine; set up the other end yourself!
|
||||||
niji.id = "BOFH5JP-A3MPTJA-EGIZVWV-URHUTSJ-2ZXCAA2-XMZPPSR-GLMOQFL-ZX7DGQP";
|
midori.id = "BOFH5JP-A3MPTJA-EGIZVWV-URHUTSJ-2ZXCAA2-XMZPPSR-GLMOQFL-ZX7DGQP";
|
||||||
};
|
};
|
||||||
folders =
|
folders =
|
||||||
let ifEnabledDevice = devices: lib.elem config.networking.hostName devices;
|
let ifEnabledDevice = devices: lib.elem config.networking.hostName devices;
|
||||||
in {
|
in {
|
||||||
archive = rec {
|
archive = rec {
|
||||||
devices = [ "kuro" "ao" "niji" ];
|
devices = [ "kuro" "ao" "midori" ];
|
||||||
path = "/home/${config.my.username}/archive";
|
path = "/home/${config.my.username}/archive";
|
||||||
watch = false;
|
watch = false;
|
||||||
rescanInterval = 7200;
|
rescanInterval = 3600 * 6;
|
||||||
|
type = lib.mkIf (! ifEnabledDevice ["kuro"]) "recieveonly";
|
||||||
|
enable = ifEnabledDevice devices;
|
||||||
|
};
|
||||||
|
share = rec {
|
||||||
|
devices = [ "kuro" "shiro" "ao" "aka" "midori" ];
|
||||||
|
path = "/home/${config.my.username}/share";
|
||||||
|
watch = true;
|
||||||
|
rescanInterval = 3600 * 6;
|
||||||
enable = ifEnabledDevice devices;
|
enable = ifEnabledDevice devices;
|
||||||
};
|
};
|
||||||
projects = rec {
|
projects = rec {
|
||||||
devices = [ "kuro" "shiro" "ao" "niji" ];
|
devices = [ "kuro" "shiro" "ao" "midori" ];
|
||||||
path = "/home/${config.my.username}/projects";
|
path = "/home/${config.my.username}/projects";
|
||||||
watch = false;
|
watch = false;
|
||||||
rescanInterval = 7200;
|
rescanInterval = 3600 * 2;
|
||||||
|
type = lib.mkIf (ifEnabledDevice ["ao"]) "recieveonly";
|
||||||
enable = ifEnabledDevice devices;
|
enable = ifEnabledDevice devices;
|
||||||
};
|
};
|
||||||
secrets = rec {
|
secrets = rec {
|
||||||
devices = [ "kuro" "shiro" "ao" "aka" ];
|
devices = [ "kuro" "shiro" "ao" "aka" ];
|
||||||
path = "/home/${config.my.username}/.secrets";
|
path = "/home/${config.my.username}/.secrets";
|
||||||
|
watch = true;
|
||||||
|
rescanInterval = 3600;
|
||||||
|
type = lib.mkIf (! ifEnabledDevice ["kuro" "shiro"]) "recieveonly";
|
||||||
enable = ifEnabledDevice devices;
|
enable = ifEnabledDevice devices;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue