diff --git a/modules/hyprspace/default.nix b/modules/hyprspace/default.nix index effca41..6d40f37 100644 --- a/modules/hyprspace/default.nix +++ b/modules/hyprspace/default.nix @@ -48,6 +48,11 @@ in { ${pkgs.replace-secret}/bin/replace-secret '@HYPRSPACEPRIVATEKEY@' "${privateKeyFile}" ${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 { HYPRSPACE_IPFS_API = config.services.kubo.settings.Addresses.API; };