From 4bbd1e8af3546ce0638f16a56c4eb5985647dfaa Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Mon, 7 Oct 2024 16:10:33 -0400 Subject: [PATCH] flake.nix: Add fakeroot requirements so root user can be discovered through (/etc/passwd /etc/group file construction) Signed-off-by: Thierry Laurion --- flake.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index 24941931..3ae2de90 100644 --- a/flake.nix +++ b/flake.nix @@ -142,6 +142,12 @@ # Git configuration for safe directory access. printf '[safe]\n\tdirectory = *\n' >/.gitconfig mkdir /tmp; # Temporary directory for various operations. + + # Ensure /etc/passwd and /etc/group exist with root entries + echo "root:x:0:0:root:/root:/bin/bash" > /etc/passwd + echo "root:x:0:" > /etc/group + mkdir -p /root + chmod 700 /root ''; }; });