configuration.nix/hosts/rico2/services/frpc.nix

28 lines
442 B
Nix
Raw Normal View History

2023-11-04 16:12:45 +05:30
{ pkgs
, secrets
, ...
}:
let
2023-07-11 22:41:18 +05:30
inherit (secrets) frp_config;
2023-11-04 16:12:45 +05:30
in
{
2023-10-08 17:46:11 +05:30
services.frp = {
2023-05-27 21:12:16 +05:30
enable = true;
2023-10-08 17:46:11 +05:30
role = "client";
settings = {
"common" = {
server_addr = "${frp_config.ip}";
server_port = 7000;
authentication_method = "token";
token = "${frp_config.token}";
};
2023-05-27 21:12:16 +05:30
2023-10-08 17:46:11 +05:30
"ssh.rico2" = {
type = "tcp";
local_port = 22;
remote_port = 6002;
};
};
};
2023-05-27 21:12:16 +05:30
}