Merge pull request #283634 from itzwam/master

nixos-rebuild: Fetch Flake's default configurationName (Hostname) from targetHost
This commit is contained in:
Pol Dellaiera 2024-05-07 13:12:17 +02:00 committed by GitHub
commit b5c90bbeb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -391,7 +391,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