nixos/rancher: fix warning (#505220)

This commit is contained in:
rorosen
2026-04-06 21:16:14 +00:00
committed by GitHub
@@ -826,8 +826,8 @@ let
"${name}: token, tokenFile or configPath (with 'token' or 'token-file' keys) should be set if role is 'agent'"
)
++ (lib.optional (
cfg.role == "agent" && !(cfg.agentTokenFile != null || cfg.agentToken != "")
) "${name}: agentToken and agentToken should not be set if role is 'agent'");
cfg.role == "agent" && (cfg.agentTokenFile != null || cfg.agentToken != "")
) "${name}: agentToken and agentTokenFile should not be set if role is 'agent'");
environment.systemPackages = [ config.services.${name}.package ];