mirror of
https://github.com/blahai/nyx.git
synced 2025-01-19 03:20:20 +00:00
28 lines
662 B
Nix
28 lines
662 B
Nix
{ lib, config, pkgs, inputs, ... }:
|
|
{
|
|
imports = [
|
|
../../../secrets/secrets.nix
|
|
];
|
|
|
|
services.cloudflared = {
|
|
enable = true;
|
|
};
|
|
|
|
users.users.cloudflared = {
|
|
group = "cloudflared";
|
|
isSystemUser = true;
|
|
};
|
|
users.groups.cloudflared = { };
|
|
|
|
systemd.services.my_tunnel = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
after = [ "network-online.target" "systemd-resolved.service" ];
|
|
serviceConfig = {
|
|
ExecStart = "${pkgs.cloudflared}/bin/cloudflared tunnel --no-autoupdate run --token=${sops.secrets.cloudflared.nyx.token}";
|
|
Restart = "always";
|
|
User = "cloudflared";
|
|
Group = "cloudflared";
|
|
};
|
|
};
|
|
|
|
}
|