0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/ec2-data: use hostname-debian to set hostname from metadata

This is the simpler, more lightweight and better maintained version of
the hostname utility.
This commit is contained in:
Martin Weinelt 2025-07-04 06:53:11 +02:00
parent 387e804c99
commit c21be3563e
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -34,7 +34,7 @@ with lib;
${optionalString (config.networking.hostName == "") ''
echo "setting host name..."
if [ -s /etc/ec2-metadata/hostname ]; then
${pkgs.nettools}/bin/hostname $(cat /etc/ec2-metadata/hostname)
${lib.getExe hostname-debian} -F /etc/ec2-metadata/hostname
fi
''}