nixos-rebuild: Fetch Flake's default configurationName (Hostname) from targetHost

This commit is contained in:
Antoine Toinux 2024-01-24 23:46:03 +01:00
parent 850239d1d0
commit 03b68f1431

View File

@ -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