summary refs log tree commit diff
path: root/nixos/modules/tasks/network-interfaces.nix
diff options
context:
space:
mode:
authorErik Arvstedt <erik.arvstedt@gmail.com>2018-09-10 21:44:48 +0200
committerErik Arvstedt <erik.arvstedt@gmail.com>2018-09-11 11:29:04 +0200
commit7a42623c23c3753c5f4a9edace3576a01b5bc543 (patch)
tree1ba90e7a6296ff7b5f9b9631b35909afd4cf7ed6 /nixos/modules/tasks/network-interfaces.nix
parent189b86163856b28b5880f78091e085c87ff182c5 (diff)
downloadnixpkgs-7a42623c23c3753c5f4a9edace3576a01b5bc543.tar
nixpkgs-7a42623c23c3753c5f4a9edace3576a01b5bc543.tar.gz
nixpkgs-7a42623c23c3753c5f4a9edace3576a01b5bc543.tar.bz2
nixpkgs-7a42623c23c3753c5f4a9edace3576a01b5bc543.tar.lz
nixpkgs-7a42623c23c3753c5f4a9edace3576a01b5bc543.tar.xz
nixpkgs-7a42623c23c3753c5f4a9edace3576a01b5bc543.tar.zst
nixpkgs-7a42623c23c3753c5f4a9edace3576a01b5bc543.zip
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.
Diffstat (limited to 'nixos/modules/tasks/network-interfaces.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces.nix2
1 files changed, 1 insertions, 1 deletions
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:
 
-        <literal>cksum /etc/machine-id | while read c rest; do printf "%x" $c; done</literal>
+        <literal>head -c 8 /etc/machine-id</literal>
 
         (this derives it from the machine-id that systemd generates) or