working on syncthing
This commit is contained in:
parent
7a459f998c
commit
e96885e3b1
3 changed files with 22 additions and 14 deletions
|
@ -79,7 +79,6 @@ with lib;
|
|||
locations."/" = {
|
||||
root = pkgs.landingpage.override {
|
||||
|
||||
|
||||
jsonConfig = [
|
||||
{ title = "System Links"; }
|
||||
{
|
||||
|
|
|
@ -1,25 +1,34 @@
|
|||
{ config, lib, pkgs, factsGenerator, ... }:
|
||||
let
|
||||
|
||||
machineDir = "${config.clanCore.clanDir}/machines";
|
||||
syncthingPub = machine:
|
||||
lib.removeSuffix "\n"
|
||||
(builtins.readFile "${machineDir}/${machine}/facts/syncthing.pub");
|
||||
zerotierIp = machine: (builtins.readFile "${machineDir}/${machine}/facts/zerotier-ip");
|
||||
in
|
||||
with lib; {
|
||||
|
||||
networking.firewall.interfaces."gummybears".allowedTCPPorts = [ 8384 ];
|
||||
# networking.firewall.interfaces."gummybears".allowedTCPPorts = [ 8384 ];
|
||||
|
||||
clanCore.facts.services.syncthing = factsGenerator.syncthing { };
|
||||
|
||||
services.syncthing = {
|
||||
#guiAddress = lib.mkDefault "${config.networking.hostName}.${config.clan.static-hosts.topLevelDomain}:8384";
|
||||
#guiAddress = lib.mkDefault "[${zerotierIp config.networking.hostName}]:8384";
|
||||
guiAddress = lib.mkDefault "${config.networking.hostName}.private:8384";
|
||||
overrideDevices = lib.mkDefault true;
|
||||
key = config.clanCore.facts.services.syncthing.secret."syncthing.key".path;
|
||||
cert = config.clanCore.facts.services.syncthing.secret."syncthing.cert".path;
|
||||
settings.devices =
|
||||
let
|
||||
machineDir = "${config.clanCore.clanDir}/machines";
|
||||
syncthingPub = machine:
|
||||
lib.removeSuffix "\n"
|
||||
(builtins.readFile "${machineDir}/${machine}/facts/syncthing.pub");
|
||||
zerotierIp = machine: (builtins.readFile "${machineDir}/${machine}/facts/zerotier-ip");
|
||||
#machineDir = "${config.clanCore.clanDir}/machines";
|
||||
#syncthingPub = machine:
|
||||
# lib.removeSuffix "\n"
|
||||
# (builtins.readFile "${machineDir}/${machine}/facts/syncthing.pub");
|
||||
#zerotierIp = machine: (builtins.readFile "${machineDir}/${machine}/facts/zerotier-ip");
|
||||
|
||||
clanDevice = machine: {
|
||||
zeroDevice = machine: {
|
||||
"${machine}" = {
|
||||
name = machine;
|
||||
id = syncthingPub machine;
|
||||
|
@ -43,10 +52,10 @@ with lib; {
|
|||
in
|
||||
{ }
|
||||
|
||||
// (tincDevice "orbi")
|
||||
// (tincDevice "cream")
|
||||
// (tincDevice "cherry")
|
||||
// (tincDevice "chungus")
|
||||
// (zeroDevice "orbi")
|
||||
// (zeroDevice "cream")
|
||||
// (zeroDevice "cherry")
|
||||
// (zeroDevice "chungus")
|
||||
|
||||
#// (device "mobi" )
|
||||
#// (device "bobi" )
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"*.private" = {
|
||||
user = "root";
|
||||
};
|
||||
"*.gummybear" = {
|
||||
"*.bear" = {
|
||||
user = "root";
|
||||
};
|
||||
"*.lan" = {
|
||||
|
|
Loading…
Reference in a new issue