From 5f7530a1d7bf3a733213f5c7666a6b6398aa48a9 Mon Sep 17 00:00:00 2001 From: wmertens Date: Thu, 18 Dec 2014 22:52:29 +0100 Subject: [PATCH] zfs hostId: Instructions to derive from machine-id --- nixos/modules/tasks/network-interfaces.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 807a56a32d2c..4a272483e549 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -233,8 +233,12 @@ in The 32-bit host ID of the machine, formatted as 8 hexadecimal characters. You should try to make this ID unique among your machines. You can - generate a random 32-bit ID using the following command: + generate a random 32-bit ID using the following commands: + cksum /etc/machine-id | while read c rest; do printf "%x" $c; done + + (this derives it from the machine-id that systemd generates) or + head -c4 /dev/urandom | od -A none -t x4 ''; };