From 2af017fe5867c2c7ae7bf85d1af3225bb048cd68 Mon Sep 17 00:00:00 2001 From: Issam Maghni Date: Sun, 1 Jan 2023 20:23:20 -0500 Subject: [PATCH] Use nix builtins for `hostId` --- docs/Getting Started/NixOS/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Getting Started/NixOS/index.rst b/docs/Getting Started/NixOS/index.rst index 9529601..d11e7a8 100644 --- a/docs/Getting Started/NixOS/index.rst +++ b/docs/Getting Started/NixOS/index.rst @@ -42,7 +42,7 @@ Live image ships with ZFS support by default. { config, pkgs, ... }: { boot.supportedFilesystems = [ "zfs" ]; - networking.hostId = "$(head -c 8 /etc/machine-id)"; + networking.hostId = (builtins.substring 0 8 (builtins.readFile "/etc/machine-id")); } EOF