From 4c365aa9fc8823ec420cf8a5b4e4f892ec6d5c4a Mon Sep 17 00:00:00 2001 From: Joel Date: Sun, 18 Dec 2022 17:19:33 +1000 Subject: [PATCH] nixos/cloudfared: fix options that are required having defaults > ERR Couldn't start tunnel error="The last ingress rule must match all URLs (i.e. it should not have a hostname or path filter)" --- nixos/modules/services/networking/cloudflared.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/networking/cloudflared.nix b/nixos/modules/services/networking/cloudflared.nix index 747dbc6e8bb..3ee43072ba8 100644 --- a/nixos/modules/services/networking/cloudflared.nix +++ b/nixos/modules/services/networking/cloudflared.nix @@ -168,8 +168,7 @@ in inherit originRequest; credentialsFile = mkOption { - type = with types; nullOr str; - default = null; + type = types.str; description = lib.mdDoc '' Credential file. @@ -190,8 +189,7 @@ in }; default = mkOption { - type = with types; nullOr str; - default = null; + type = types.str; description = lib.mdDoc '' Catch-all service if no ingress matches. @@ -262,12 +260,12 @@ in systemd.targets = mapAttrs' (name: tunnel: - nameValuePair "cloudflared-tunnel-${name}" ({ + nameValuePair "cloudflared-tunnel-${name}" { description = "Cloudflare tunnel '${name}' target"; requires = [ "cloudflared-tunnel-${name}.service" ]; after = [ "cloudflared-tunnel-${name}.service" ]; unitConfig.StopWhenUnneeded = true; - }) + } ) config.services.cloudflared.tunnels;