From c21be3563ed335e85ed205183c181abfb32aa37c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 4 Jul 2025 06:53:11 +0200 Subject: [PATCH] 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. --- nixos/modules/virtualisation/ec2-data.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/ec2-data.nix b/nixos/modules/virtualisation/ec2-data.nix index 84508da0c5a0..63fc61f12a78 100644 --- a/nixos/modules/virtualisation/ec2-data.nix +++ b/nixos/modules/virtualisation/ec2-data.nix @@ -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 ''}