From 753b341f8c81cb63d6d323ffa59b57a11f16950d Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Thu, 20 Mar 2025 17:36:22 +0900 Subject: [PATCH] networking: add a default value for `targetHost` --- nixosModules/clanCore/networking.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixosModules/clanCore/networking.nix b/nixosModules/clanCore/networking.nix index 390e6e9e1..4c8b28c24 100644 --- a/nixosModules/clanCore/networking.nix +++ b/nixosModules/clanCore/networking.nix @@ -6,7 +6,8 @@ description = '' The target SSH node for deployment. - By default, the node's attribute name will be used. + By default, the node's fully quantified domain name or hostname will be used. + If set to null, only local deployment will be supported. format: user@host:port?SSH_OPTION=SSH_VALUE[&SSH_OPTION_2=VALUE_2] @@ -15,7 +16,8 @@ - user@machine2.example.com - root@example.com:2222?IdentityFile=/path/to/private/key&StrictHostKeyChecking=yes ''; - default = null; + default = "root@${config.networking.fqdnOrHostName}"; + defaultText = "root@\${config.networking.fqdnOrHostName}"; type = lib.types.nullOr lib.types.str; }; buildHost = lib.mkOption {