mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
Compare commits
2 commits
4cd24ddfc4
...
f93908d157
| Author | SHA1 | Date | |
|---|---|---|---|
| f93908d157 | |||
| eee2cebd21 |
1 changed files with 13 additions and 6 deletions
|
|
@ -9,6 +9,11 @@ let
|
||||||
netCfg = config.custom.networking;
|
netCfg = config.custom.networking;
|
||||||
|
|
||||||
publicPort = 47141;
|
publicPort = 47141;
|
||||||
|
|
||||||
|
lighthouses =
|
||||||
|
netCfg.peers
|
||||||
|
|> lib.filter (peer: peer.overlay.isLighthouse)
|
||||||
|
|> lib.map (lighthouse: lighthouse.overlay.address);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.custom.services.nebula = {
|
options.custom.services.nebula = {
|
||||||
|
|
@ -71,14 +76,16 @@ in
|
||||||
key = config.sops.secrets."nebula/host-key".path;
|
key = config.sops.secrets."nebula/host-key".path;
|
||||||
|
|
||||||
tun.device = netCfg.overlay.interface;
|
tun.device = netCfg.overlay.interface;
|
||||||
listen.port = lib.mkIf netCfg.underlay.isPublic publicPort;
|
listen = {
|
||||||
|
host = lib.mkIf (netCfg.underlay.address != null) netCfg.underlay.address;
|
||||||
|
port = lib.mkIf netCfg.underlay.isPublic publicPort;
|
||||||
|
};
|
||||||
|
|
||||||
inherit (netCfg.overlay) isLighthouse;
|
inherit (netCfg.overlay) isLighthouse;
|
||||||
lighthouses = lib.mkIf (!netCfg.overlay.isLighthouse) (
|
lighthouses = lib.mkIf (!netCfg.overlay.isLighthouse) lighthouses;
|
||||||
netCfg.peers
|
|
||||||
|> lib.filter (peer: peer.overlay.isLighthouse)
|
isRelay = netCfg.overlay.isLighthouse;
|
||||||
|> lib.map (lighthouse: lighthouse.overlay.address)
|
relays = lib.mkIf (!netCfg.overlay.isLighthouse) lighthouses;
|
||||||
);
|
|
||||||
|
|
||||||
staticHostMap =
|
staticHostMap =
|
||||||
netCfg.peers
|
netCfg.peers
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue