From 52b711667ee2236c05656935a81b3b8e47431bea Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Fri, 4 Jul 2025 10:02:06 +0200 Subject: [PATCH] lib/get_host: improve abstraction, turn missconfiguration into a warning Motivation: A warning should encourage consistent usage of inventory.machines setting targetHost inside the machine should be considered a custom override Changing the warning strings to avoid the term 'nix'/'json' both inventory and nixos machines are nix features --- pkgs/clan-cli/clan_lib/machines/machines.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/clan-cli/clan_lib/machines/machines.py b/pkgs/clan-cli/clan_lib/machines/machines.py index 3715308f6..400a336d8 100644 --- a/pkgs/clan-cli/clan_lib/machines/machines.py +++ b/pkgs/clan-cli/clan_lib/machines/machines.py @@ -188,7 +188,7 @@ def get_host( if host_str is None: machine.warn( - f"'{field}' is not set in `inventory.machines.${name}.deploy.targetHost` - falling back to _slower_ nixos option: `clan.core.networking.targetHost`" + f"'{field}' is not set in `inventory.machines.${name}.deploy.targetHost` - falling back to _slower_ nixos option: `clan.core.networking.{field}`" ) host_str = machine.select(f'config.clan.core.networking."{field}"') source = "machine"