diff options
author | Erik Arvstedt <erik.arvstedt@gmail.com> | 2018-09-10 21:44:48 +0200 |
---|---|---|
committer | Erik Arvstedt <erik.arvstedt@gmail.com> | 2018-09-11 11:29:04 +0200 |
commit | 7a42623c23c3753c5f4a9edace3576a01b5bc543 (patch) | |
tree | 1ba90e7a6296ff7b5f9b9631b35909afd4cf7ed6 /nixos/modules/tasks/network-interfaces.nix | |
parent | 189b86163856b28b5880f78091e085c87ff182c5 (diff) |
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 '')
-rw-r--r-- | nixos/modules/tasks/network-interfaces.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 20a740ce1f0c..815523093dde 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 |