Merge pull request #206674 from jyooru/fix/nixos/cloudflared

nixos/cloudflared: fix invalid systemd unit, required options with defaults
This commit is contained in:
0x4A6F 2022-12-30 17:30:51 +01:00 committed by GitHub
commit 3b67e9f841
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}" ({
description = lib.mdDoc "Cloudflare tunnel '${name}' target";
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;