modules/hyprspace: add route configuration support
This commit is contained in:
parent
df475e51b5
commit
214aa4b74e
1 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,9 @@ let
|
|||
myNode = hosts.${hostName};
|
||||
listenPort = myNode.hypr.listenPort or 8001;
|
||||
|
||||
routes' = map (x: lib.genAttrs (x.hypr.routes or []) (_: { ip = x.hypr.addr; })) (builtins.attrValues hyprspaceCapableNodes);
|
||||
routes = builtins.foldl' (x: y: x // y) {} (lib.flatten routes');
|
||||
|
||||
interfaceConfig = pkgs.writeText "hyprspace.yml" (builtins.toJSON {
|
||||
interface = {
|
||||
name = "hyprspace";
|
||||
|
@ -19,6 +22,7 @@ let
|
|||
private_key = "@HYPRSPACEPRIVATEKEY@";
|
||||
};
|
||||
peers = peerList;
|
||||
inherit routes;
|
||||
});
|
||||
|
||||
privateKeyFile = config.age.secrets.hyprspace-key.path;
|
||||
|
|
Loading…
Add table
Reference in a new issue