home-manager: use short -f instead of --fqdn
MacOS doesn't support the long-style `--fqdn` option to `hostname` that
was added by 1b589257f7
.
Switch to short style `-f` that should be supported on every platform.
This commit is contained in:
parent
29c69d9a46
commit
0eb314b4f0
|
@ -200,7 +200,7 @@ function setFlakeAttribute() {
|
||||||
local name="$USER"
|
local name="$USER"
|
||||||
# Check FQDN, long, and short hostnames; long first to preserve
|
# Check FQDN, long, and short hostnames; long first to preserve
|
||||||
# pre-existing behaviour in case both happen to be defined.
|
# pre-existing behaviour in case both happen to be defined.
|
||||||
for n in "$USER@$(hostname --fqdn)" "$USER@$(hostname)" "$USER@$(hostname -s)"; do
|
for n in "$USER@$(hostname -f)" "$USER@$(hostname)" "$USER@$(hostname -s)"; do
|
||||||
if [[ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$n\"")" == "true" ]]; then
|
if [[ "$(nix eval "$flake#homeConfigurations" --apply "x: x ? \"$n\"")" == "true" ]]; then
|
||||||
name="$n"
|
name="$n"
|
||||||
if [[ -v VERBOSE ]]; then
|
if [[ -v VERBOSE ]]; then
|
||||||
|
|
Loading…
Reference in a new issue