flake.nix: Add fakeroot requirements so root user can be discovered through (/etc/passwd /etc/group file construction)

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
Thierry Laurion 2024-10-07 16:10:33 -04:00
parent 066dc144ce
commit 4bbd1e8af3

View File

@ -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
'';
};
});