mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
feat[server]: add home proxy
This commit is contained in:
parent
75891c3103
commit
c1c7431891
84 changed files with 2961 additions and 1601 deletions
|
|
@ -1,13 +1,25 @@
|
|||
{ lib, config, globals, ... }:
|
||||
{ lib, config, globals, confLib, ... }:
|
||||
let
|
||||
inherit (confLib.static) webProxy;
|
||||
in
|
||||
{
|
||||
topology.self = {
|
||||
icon = lib.mkIf config.swarselsystems.isCloud "devices.cloud-server";
|
||||
interfaces.wan = lib.mkIf config.swarselsystems.isCloud { };
|
||||
interfaces.wg = lib.mkIf (config.swarselsystems.server.wireguard.isClient || config.swarselsystems.server.wireguard.isServer) {
|
||||
addresses = [ globals.networks.twothreetunnel-wg.hosts.${config.node.name}.ipv4 ];
|
||||
renderer.hidePhysicalConnections = true;
|
||||
virtual = true;
|
||||
type = "wireguard";
|
||||
interfaces = {
|
||||
wan = lib.mkIf (config.swarselsystems.isCloud && config.swarselsystems.server.localNetwork == "wan") { };
|
||||
lan = lib.mkIf (config.swarselsystems.isCloud && config.swarselsystems.server.localNetwork == "lan") { };
|
||||
wgProxy = lib.mkIf (config.swarselsystems.server.wireguard ? wgHome) {
|
||||
addresses = [ globals.networks."${webProxy}-wg.hosts".${config.node.name}.ipv4 ];
|
||||
renderer.hidePhysicalConnections = true;
|
||||
virtual = true;
|
||||
type = "wireguard";
|
||||
};
|
||||
wgHome = lib.mkIf (config.swarselsystems.server.wireguard ? wgHome) {
|
||||
addresses = [ globals.networks.home-wgHome.hosts.${config.node.name}.ipv4 ];
|
||||
renderer.hidePhysicalConnections = true;
|
||||
virtual = true;
|
||||
type = "wireguard";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue