fixing syncthing (using tinc again)
This commit is contained in:
parent
5c63d0ce64
commit
60c44fde5a
3 changed files with 22 additions and 27 deletions
|
@ -23,16 +23,14 @@ with lib; {
|
|||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = lib.mkForce false; # fixme: make sure zerotier works befor enabling this again.
|
||||
guiAddress = lib.mkDefault "${config.networking.hostName}.${ config.clan.static-hosts.topLevelDomain }:8384";
|
||||
#guiAddress = lib.mkDefault "${config.networking.hostName}.${ config.clan.static-hosts.topLevelDomain }:8384";
|
||||
guiAddress = lib.mkDefault "${config.networking.hostName}.private:8384";
|
||||
overrideDevices = lib.mkDefault true;
|
||||
key = "/run/facts/syncthing.key";
|
||||
cert = "/run/facts/syncthing.cert";
|
||||
settings.devices =
|
||||
let
|
||||
machineDir = "${config.clanCore.clanDir}/machines";
|
||||
#machinesFileSet = builtins.readDir machineDir;
|
||||
#machines = lib.mapAttrsToList (name: _: name) machinesFileSet;
|
||||
syncthingPub = machine:
|
||||
lib.removeSuffix "\n"
|
||||
(builtins.readFile "${machineDir}/${machine}/facts/syncthing.pub");
|
||||
|
@ -45,40 +43,35 @@ with lib; {
|
|||
addresses = [ "tcp://[${zerotierIp machine}]:22000" ];
|
||||
};
|
||||
};
|
||||
|
||||
device = name: id: {
|
||||
"${name}" = {
|
||||
name = name;
|
||||
tincDevice = machine: {
|
||||
"${machine}" = {
|
||||
name = machine;
|
||||
id = syncthingPub machine;
|
||||
addresses = [ "tcp://${machine}.private:22000" ];
|
||||
};
|
||||
};
|
||||
device = machine: id: {
|
||||
"${machine}" = {
|
||||
name = machine;
|
||||
id = id;
|
||||
addresses = [ "tcp://${name}.private:22000" ];
|
||||
#addresses = [ "tcp://${machine}.private:22000" ];
|
||||
};
|
||||
};
|
||||
in
|
||||
{ }
|
||||
#{
|
||||
# "orbi" = {
|
||||
# name = "orbi";
|
||||
# id = "5U5ZP6R-SUQO5SY-WICWWLZ-HPHQBM5-P27YSU6-66TWIBK-XLX4X5N-4O6TVAC";
|
||||
# addresses = [ "tcp://95.216.66.212:22000" ];
|
||||
# };
|
||||
#}
|
||||
|
||||
// (tincDevice "orbi")
|
||||
// (tincDevice "cream")
|
||||
// (tincDevice "cherry")
|
||||
// (tincDevice "chungus")
|
||||
|
||||
#// (device "mobi" )
|
||||
#// (device "bobi" )
|
||||
// (clanDevice "orbi")
|
||||
// (clanDevice "cream")
|
||||
// (clanDevice "cherry")
|
||||
// (clanDevice "chungus")
|
||||
|
||||
|
||||
// (device "iPhone" "APFS6SA-VVTARXU-3WHHRZG-TE5N3T4-X4IC76V-T67EKZ6-NLGP3TW-EZYXYAH")
|
||||
// (device "iPad" "JDDNVYD-H3WMSSS-WZ745KL-7QEGN6O-ZSGQLQU-YBR2L42-7FO7KJ4-BXPYDA5")
|
||||
// {
|
||||
bumba = {
|
||||
name = "windows-bumba";
|
||||
id = "JS7PWTO-VKFGBUP-GNFLSWP-MGFJ2KH-HLO2LKW-V3RPCR6-PCB5SQC-42FCKQZ";
|
||||
};
|
||||
};
|
||||
// (device "bumba" "JS7PWTO-VKFGBUP-GNFLSWP-MGFJ2KH-HLO2LKW-V3RPCR6-PCB5SQC-42FCKQZ")
|
||||
;
|
||||
|
||||
settings.folders = {
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
enable = true;
|
||||
openDefaultPorts = false;
|
||||
user = "palo";
|
||||
group = "users";
|
||||
dataDir = "/home/palo/.syncthing";
|
||||
configDir = "/home/palo/.syncthing";
|
||||
overrideFolders = true;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
enable = true;
|
||||
openDefaultPorts = false;
|
||||
user = "palo";
|
||||
group = "users";
|
||||
dataDir = "/home/palo/.syncthing";
|
||||
configDir = "/home/palo/.syncthing";
|
||||
overrideFolders = true;
|
||||
|
|
Loading…
Reference in a new issue