From 7fe3e8ceb1679a0fcdffd85721a8906b794cd586 Mon Sep 17 00:00:00 2001 From: Maurice Zhou Date: Tue, 7 Sep 2021 07:28:46 +0800 Subject: [PATCH] NixOS on ZFS: replace manual root password generation with bash variable Signed-off-by: Maurice Zhou --- .../NixOS/Root on ZFS/4-system-installation.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/Getting Started/NixOS/Root on ZFS/4-system-installation.rst b/docs/Getting Started/NixOS/Root on ZFS/4-system-installation.rst index d01dc0b..18f78fa 100644 --- a/docs/Getting Started/NixOS/Root on ZFS/4-system-installation.rst +++ b/docs/Getting Started/NixOS/Root on ZFS/4-system-installation.rst @@ -26,15 +26,14 @@ of declaratively configuring the system. #. Generate password hash:: - mkpasswd -m SHA-512 -s - #output: $6$DeHnzc + INST_ROOT_PASSWD=$(mkpasswd -m SHA-512 -s) #. Declare `initialHashedPassword `__ for root user:: - tee -a /mnt/etc/nixos/${INST_CONFIG_FILE} <<-'EOF' - users.users.root.initialHashedPassword = "$6$DeHnzc"; + tee -a /mnt/etc/nixos/${INST_CONFIG_FILE} <