1
0
Fork 0
dotfiles/system/nixos/cloudflared.nix

24 lines
629 B
Nix
Raw Normal View History

2023-02-06 11:47:54 +01:00
{ pkgs, config, ... }:
2022-12-26 17:53:21 +01:00
{
users.users.cloudflared = {
group = "cloudflared";
isSystemUser = true;
};
users.groups.cloudflared = { };
2022-12-26 17:58:03 +01:00
systemd.services.cloudflared-sail = {
2022-12-26 17:53:21 +01:00
wantedBy = [ "multi-user.target" ];
2023-02-06 11:47:54 +01:00
after = [ "network.target" "network-online.target" ];
wants = [ "network.target" "network-online.target" ];
2022-12-26 17:53:21 +01:00
serviceConfig = {
2023-02-06 11:47:54 +01:00
ExecStart = "${pkgs.cloudflared}/bin/cloudflared tunnel --no-autoupdate run";
EnvironmentFile = [ config.age.secrets.cloudflared-environment.path ];
Restart = "on-failure";
2022-12-26 17:53:21 +01:00
User = "cloudflared";
Group = "cloudflared";
};
};
}