From 7a42623c23c3753c5f4a9edace3576a01b5bc543 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 10 Sep 2018 21:44:48 +0200 Subject: [PATCH] networking.hostId: fix cmd in description 1. Simplify the command by reading directly from /etc/machine-id which is already a random, lower-case hex string 2. Previously, the command output could be too short because of missing leading digits. This is now fixed. --- nixos/modules/tasks/network-interfaces.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 20a740ce1f0..815523093dd 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -341,7 +341,7 @@ in You should try to make this ID unique among your machines. You can generate a random 32-bit ID using the following commands: - cksum /etc/machine-id | while read c rest; do printf "%x" $c; done + head -c 8 /etc/machine-id (this derives it from the machine-id that systemd generates) or