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."/" = {
|
locations."/" = {
|
||||||
root = pkgs.landingpage.override {
|
root = pkgs.landingpage.override {
|
||||||
|
|
||||||
|
|
||||||
jsonConfig = [
|
jsonConfig = [
|
||||||
{ title = "System Links"; }
|
{ title = "System Links"; }
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,25 +1,34 @@
|
||||||
{ config, lib, pkgs, factsGenerator, ... }:
|
{ 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; {
|
with lib; {
|
||||||
|
|
||||||
networking.firewall.interfaces."gummybears".allowedTCPPorts = [ 8384 ];
|
# networking.firewall.interfaces."gummybears".allowedTCPPorts = [ 8384 ];
|
||||||
|
|
||||||
clanCore.facts.services.syncthing = factsGenerator.syncthing { };
|
clanCore.facts.services.syncthing = factsGenerator.syncthing { };
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
#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 "[${zerotierIp config.networking.hostName}]:8384";
|
||||||
guiAddress = lib.mkDefault "${config.networking.hostName}.private:8384";
|
guiAddress = lib.mkDefault "${config.networking.hostName}.private:8384";
|
||||||
overrideDevices = lib.mkDefault true;
|
overrideDevices = lib.mkDefault true;
|
||||||
key = config.clanCore.facts.services.syncthing.secret."syncthing.key".path;
|
key = config.clanCore.facts.services.syncthing.secret."syncthing.key".path;
|
||||||
cert = config.clanCore.facts.services.syncthing.secret."syncthing.cert".path;
|
cert = config.clanCore.facts.services.syncthing.secret."syncthing.cert".path;
|
||||||
settings.devices =
|
settings.devices =
|
||||||
let
|
let
|
||||||
machineDir = "${config.clanCore.clanDir}/machines";
|
#machineDir = "${config.clanCore.clanDir}/machines";
|
||||||
syncthingPub = machine:
|
#syncthingPub = machine:
|
||||||
lib.removeSuffix "\n"
|
# lib.removeSuffix "\n"
|
||||||
(builtins.readFile "${machineDir}/${machine}/facts/syncthing.pub");
|
# (builtins.readFile "${machineDir}/${machine}/facts/syncthing.pub");
|
||||||
zerotierIp = machine: (builtins.readFile "${machineDir}/${machine}/facts/zerotier-ip");
|
#zerotierIp = machine: (builtins.readFile "${machineDir}/${machine}/facts/zerotier-ip");
|
||||||
|
|
||||||
clanDevice = machine: {
|
zeroDevice = machine: {
|
||||||
"${machine}" = {
|
"${machine}" = {
|
||||||
name = machine;
|
name = machine;
|
||||||
id = syncthingPub machine;
|
id = syncthingPub machine;
|
||||||
|
@ -43,10 +52,10 @@ with lib; {
|
||||||
in
|
in
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
// (tincDevice "orbi")
|
// (zeroDevice "orbi")
|
||||||
// (tincDevice "cream")
|
// (zeroDevice "cream")
|
||||||
// (tincDevice "cherry")
|
// (zeroDevice "cherry")
|
||||||
// (tincDevice "chungus")
|
// (zeroDevice "chungus")
|
||||||
|
|
||||||
#// (device "mobi" )
|
#// (device "mobi" )
|
||||||
#// (device "bobi" )
|
#// (device "bobi" )
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"*.private" = {
|
"*.private" = {
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
"*.gummybear" = {
|
"*.bear" = {
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
"*.lan" = {
|
"*.lan" = {
|
||||||
|
|
Loading…
Reference in a new issue