Merge pull request #28 from nix-community/ci

be more explicit about modes
This commit is contained in:
Jörg Thalheim 2022-11-10 17:13:34 +01:00 committed by GitHub
commit 1bafb82cd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,9 +79,10 @@
# Restore ssh host and user keys if they are available.
# This avoids warnings of unknown ssh keys.
boot.initrd.postMountCommands = ''
mkdir -p /mnt-root/etc/ssh /mnt-root/root/.ssh
mkdir -m 700 -p /mnt-root/root/.ssh
mkdir -m 755 -p /mnt-root/etc/ssh
if [[ -f /ssh/authorized_keys ]]; then
cp ssh/authorized_keys /mnt-root/root/.ssh/
install -m 400 ssh/authorized_keys /mnt-root/root/.ssh
fi
install -m 400 ssh/ssh_host_* /mnt-root/etc/ssh
'';