diff --git a/home-manager/home-manager b/home-manager/home-manager index ab4de5387..8b7bbc76a 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -202,8 +202,7 @@ function setFlakeAttribute() { local hostnameArray=() # FQDN lookup can fail depending on the resolver. local fqdn - fqdn="$(hostname -f 2> /dev/null)" - if [[ $? -eq 0 ]]; then + if fqdn="$(hostname -f 2> /dev/null)"; then hostnameArray+=( "$USER@$fqdn" ) fi # Check FQDN, long, and short hostnames; long first to preserve