Simplify cloudflared service to minimal working configuration
This commit is contained in:
parent
12b1281e88
commit
f3b2675677
1 changed files with 10 additions and 9 deletions
|
|
@ -1,20 +1,21 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.cloudflared ];
|
environment.systemPackages = [ pkgs.cloudflared ];
|
||||||
|
|
||||||
systemd.services.cloudflared-warp-ssh = {
|
systemd.services.cloudflared-warp = {
|
||||||
description = "Cloudflared SSH tunnel to warp.ftl.host → localhost:22";
|
description = "Cloudflared TCP tunnel for SSH";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
serviceConfig = {
|
wants = [ "network-online.target" ];
|
||||||
ExecStart = "${pkgs.cloudflared}/bin/cloudflared access tcp --hostname warp.ftl.host --url localhost:22 --port 4401 --logfile /var/log/cloudflared-warp.log";
|
|
||||||
Restart = "always";
|
|
||||||
User = "root";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
serviceConfig = {
|
||||||
"d /var/log 0755 root root -"
|
ExecStart = "${pkgs.cloudflared}/bin/cloudflared access tcp --hostname warp.ftl.host --url localhost:22 --port 4401";
|
||||||
];
|
Restart = "always";
|
||||||
|
RestartSec = "5s";
|
||||||
|
Type = "exec";
|
||||||
|
StandardOutput = "journal";
|
||||||
|
StandardError = "journal";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue