modules/hyprspace: use new config format
This commit is contained in:
parent
9954f8eb03
commit
f6e6815aa5
1 changed files with 9 additions and 8 deletions
|
@ -14,12 +14,14 @@ let
|
||||||
listenPort = myNode.hyprspace.listenPort or 8001;
|
listenPort = myNode.hyprspace.listenPort or 8001;
|
||||||
|
|
||||||
interfaceConfig = pkgs.writeText "hyprspace.json" (builtins.toJSON {
|
interfaceConfig = pkgs.writeText "hyprspace.json" (builtins.toJSON {
|
||||||
interface = {
|
listenAddresses = let
|
||||||
name = "hyprspace";
|
inherit (myNode.interfaces.primary) addr;
|
||||||
listen_port = listenPort;
|
port = toString listenPort;
|
||||||
inherit (myNode.hyprspace) id;
|
in [
|
||||||
private_key = "@HYPRSPACEPRIVATEKEY@";
|
"/ip4/${addr}/tcp/${port}"
|
||||||
};
|
"/ip4/${addr}/udp/${port}/quic-v1"
|
||||||
|
];
|
||||||
|
privateKey = "@HYPRSPACEPRIVATEKEY@";
|
||||||
peers = peerList;
|
peers = peerList;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -50,8 +52,7 @@ in {
|
||||||
Group = "wheel";
|
Group = "wheel";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = "5s";
|
RestartSec = "5s";
|
||||||
ExecStart = "${hyprspace}/bin/hyprspace up hyprspace -f -c ${runConfig}";
|
ExecStart = "${hyprspace}/bin/hyprspace up -c ${runConfig}";
|
||||||
ExecStop = "${hyprspace}/bin/hyprspace down hyprspace";
|
|
||||||
ExecStopPost = "${pkgs.coreutils}/bin/rm -f /run/hyprspace-rpc.hyprspace.sock";
|
ExecStopPost = "${pkgs.coreutils}/bin/rm -f /run/hyprspace-rpc.hyprspace.sock";
|
||||||
IPAddressDeny = [
|
IPAddressDeny = [
|
||||||
"10.0.0.0/8"
|
"10.0.0.0/8"
|
||||||
|
|
Loading…
Reference in a new issue