From 03b68f14319c179b146e04405763a458a23247c2 Mon Sep 17 00:00:00 2001 From: Antoine Toinux Date: Wed, 24 Jan 2024 23:46:03 +0100 Subject: [PATCH] nixos-rebuild: Fetch Flake's default configurationName (Hostname) from targetHost --- pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index bde6ff9d959b..ff4184e19618 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -390,7 +390,7 @@ if [[ -n $flake ]]; then flakeAttr="${BASH_REMATCH[2]}" fi if [[ -z $flakeAttr ]]; then - read -r hostname < /proc/sys/kernel/hostname + hostname="$(targetHostCmd cat /proc/sys/kernel/hostname)" if [[ -z $hostname ]]; then hostname=default fi