configuration.nix/hosts/rico1/services/frpc.nix

45 lines
848 B
Nix
Raw Normal View History

2023-08-15 13:06:06 +05:30
{
pkgs,
secrets,
...
}: let
inherit (secrets) frp_config;
in {
2023-10-08 17:46:11 +05:30
services.frp = {
2023-08-15 13:06:06 +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-08-15 13:06:06 +05:30
2023-10-08 17:46:11 +05:30
"ssh.rico1" = {
type = "tcp";
local_port = 22;
remote_port = 6001;
};
2023-08-20 19:42:57 +05:30
2023-10-08 17:46:11 +05:30
"http.matrix.adtya.xyz" = {
type = "http";
custom_domains = "matrix.adtya.xyz";
local_port = 80;
};
2023-08-20 19:42:57 +05:30
2023-10-08 17:46:11 +05:30
"https.matrix.adtya.xyz" = {
type = "https";
custom_domains = "matrix.adtya.xyz";
local_port = 443;
};
2023-08-20 19:42:57 +05:30
2023-10-08 17:46:11 +05:30
"https.matrix.adtya.xyz.8448" = {
type = "tcp";
local_port = 8448;
remote_port = 8448;
};
};
};
2023-08-15 13:06:06 +05:30
}