1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Merge pull request #340 from hauleth/fix/use-short-hostname

Use short hostname as flake attribute name
This commit is contained in:
Domen Kožar 2022-03-26 07:11:11 +00:00 committed by GitHub
commit 4fdbb8168f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,9 +120,9 @@ if [ -n "$flake" ]; then
flakeAttr="${BASH_REMATCH[2]}"
fi
if [ -z "$flakeAttr" ]; then
flakeAttr=$(hostname)
flakeAttr=$(hostname -s)
fi
flakeAttr=darwinConfigurations.${flakeAttr%.local}
flakeAttr=darwinConfigurations.${flakeAttr}
fi
if [ -n "$flake" ]; then