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

24 lines
629 B
Nix
Raw Permalink Normal View History

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