My cloudflared.nix file is below; I explicitly enable cloudflared and add the package to the system, but when I run systemctl status cloudflared
I get “Unit cloudflared.service could not be found.” Why is the cloudflared service not being installed?
# cloudflared.nix
{ config, pkgs, ... }:
{
services.cloudflared = {
enable = true;
tunnels = {
"<tunnel-id>" = {
credentialsFile = "/home/sam/.cloudflared/<tunnel-id>.json";
default = "http_status:404";
};
};
};
environment.systemPackages = with pkgs; [
cloudflared
];
}