summary refs log tree commit diff
path: root/nixos/modules/tasks/network-interfaces.nix
diff options
context:
space:
mode:
authorwmertens <Wout.Mertens@gmail.com>2014-12-18 22:52:29 +0100
committerwmertens <Wout.Mertens@gmail.com>2014-12-18 22:52:29 +0100
commit5f7530a1d7bf3a733213f5c7666a6b6398aa48a9 (patch)
treeae6dfc0df7415cae6cbfb866e783bd00f2d84881 /nixos/modules/tasks/network-interfaces.nix
parent86971fd33bfb127981645d86d2a066e6b020171a (diff)
downloadnixpkgs-5f7530a1d7bf3a733213f5c7666a6b6398aa48a9.tar
nixpkgs-5f7530a1d7bf3a733213f5c7666a6b6398aa48a9.tar.gz
nixpkgs-5f7530a1d7bf3a733213f5c7666a6b6398aa48a9.tar.bz2
nixpkgs-5f7530a1d7bf3a733213f5c7666a6b6398aa48a9.tar.lz
nixpkgs-5f7530a1d7bf3a733213f5c7666a6b6398aa48a9.tar.xz
nixpkgs-5f7530a1d7bf3a733213f5c7666a6b6398aa48a9.tar.zst
nixpkgs-5f7530a1d7bf3a733213f5c7666a6b6398aa48a9.zip
zfs hostId: Instructions to derive from machine-id
Diffstat (limited to 'nixos/modules/tasks/network-interfaces.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index 807a56a32d2..4a272483e54 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:
 
+        <literal>cksum /etc/machine-id | while read c rest; do printf "%x" $c; done</literal>
+        
+        (this derives it from the machine-id that systemd generates) or
+        
         <literal>head -c4 /dev/urandom | od -A none -t x4</literal>
       '';
     };