diff --git a/nixos/components/network/nginx.nix b/nixos/components/network/nginx.nix index 6dfcf20..3fb5686 100644 --- a/nixos/components/network/nginx.nix +++ b/nixos/components/network/nginx.nix @@ -79,7 +79,6 @@ with lib; locations."/" = { root = pkgs.landingpage.override { - jsonConfig = [ { title = "System Links"; } { diff --git a/nixos/components/network/syncthing.nix b/nixos/components/network/syncthing.nix index 08d49ea..3d83131 100644 --- a/nixos/components/network/syncthing.nix +++ b/nixos/components/network/syncthing.nix @@ -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 "${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" ) diff --git a/nixos/homes/palo/ssh.nix b/nixos/homes/palo/ssh.nix index 16e9055..1294ccb 100644 --- a/nixos/homes/palo/ssh.nix +++ b/nixos/homes/palo/ssh.nix @@ -21,7 +21,7 @@ "*.private" = { user = "root"; }; - "*.gummybear" = { + "*.bear" = { user = "root"; }; "*.lan" = {