modules/hyprspace: set up routes
This commit is contained in:
parent
b2011b672f
commit
e837adeca8
1 changed files with 5 additions and 0 deletions
|
@ -48,6 +48,11 @@ in {
|
||||||
${pkgs.replace-secret}/bin/replace-secret '@HYPRSPACEPRIVATEKEY@' "${privateKeyFile}" ${runConfig}
|
${pkgs.replace-secret}/bin/replace-secret '@HYPRSPACEPRIVATEKEY@' "${privateKeyFile}" ${runConfig}
|
||||||
chmod 0400 ${runConfig}
|
chmod 0400 ${runConfig}
|
||||||
'';
|
'';
|
||||||
|
postStart = ''
|
||||||
|
sleep 1
|
||||||
|
'' + lib.concatStringsSep "\n" (lib.mapAttrsToList (net: v:
|
||||||
|
"${pkgs.iproute2}/bin/ip route add ${net} via ${v.ip} dev hyprspace metric 30000"
|
||||||
|
) routes);
|
||||||
environment = lib.optionalAttrs config.services.kubo.enable {
|
environment = lib.optionalAttrs config.services.kubo.enable {
|
||||||
HYPRSPACE_IPFS_API = config.services.kubo.settings.Addresses.API;
|
HYPRSPACE_IPFS_API = config.services.kubo.settings.Addresses.API;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue