nixos/cloudflared: remove assertion for certificateFile (#390109)

Nick Cao 3070dbed 6b20b2d4

Changed files
+4 -8
nixos
modules
services
networking
+4 -8
nixos/modules/services/networking/cloudflared.nix
···
certificateFile = lib.mkOption {
type = with lib.types; nullOr path;
description = ''
-
Cert.pem file.
-
See [Cert.pem](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-useful-terms/#certpem).
'';
default = null;
};
···
};
config = lib.mkIf cfg.enable {
-
assertions = lib.mapAttrsToList (name: tunnel: {
-
assertion =
-
tunnel.ingress == { } || (cfg.certificateFile != null || tunnel.certificateFile != null);
-
message = "Cloudflare Tunnel ${name} has a declarative configuration, but no certificate file was defined.";
-
}) cfg.tunnels;
-
systemd.targets = lib.mapAttrs' (
name: tunnel:
lib.nameValuePair "cloudflared-tunnel-${name}" {
···
certificateFile = lib.mkOption {
type = with lib.types; nullOr path;
description = ''
+
Account certificate file, necessary to create, delete and manage tunnels. It can be obtained by running `cloudflared login`.
+
Note that this is **necessary** for a fully declarative set up, as routes can not otherwise be created outside of the Cloudflare interface.
+
+
See [Cert.pem](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-useful-terms/#certpem) for information about the file, and [Tunnel permissions](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/tunnel-permissions/) for a comparison between the account certificate and the tunnel credentials file.
'';
default = null;
};
···
};
config = lib.mkIf cfg.enable {
systemd.targets = lib.mapAttrs' (
name: tunnel:
lib.nameValuePair "cloudflared-tunnel-${name}" {