Skip to content

Commit

Permalink
hosts.pixel7a: revert wrong change in nix-on-droid config
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerschtli committed Jun 13, 2024
1 parent c153a25 commit da95ee6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions hosts/pixel7a/nix-on-droid.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ in
{
# FIXME: Move sshd config to nix-on-droid
build.activation.sshd = ''
run mkdir $VERBOSE_ARG --parents "${config.user.home}/.ssh"
run cat "${rootPath}/files/keys/id_rsa.tobias.pub" > "${config.user.home}/.ssh/authorized_keys"
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${config.user.home}/.ssh"
$DRY_RUN_CMD cat "${rootPath}/files/keys/id_rsa.tobias.pub" > "${config.user.home}/.ssh/authorized_keys"
if [[ ! -d "${sshdDirectory}" ]]; then
run rm $VERBOSE_ARG --recursive --force "${sshdTmpDirectory}"
run mkdir $VERBOSE_ARG --parents "${sshdTmpDirectory}"
$DRY_RUN_CMD rm $VERBOSE_ARG --recursive --force "${sshdTmpDirectory}"
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${sshdTmpDirectory}"
verboseEcho "Generating host keys..."
run ${pkgs.openssh}/bin/ssh-keygen -t rsa -b 4096 -f "${sshdTmpDirectory}/ssh_host_rsa_key" -N ""
verboseEcho "Writing sshd_config..."
run echo -e "HostKey ${sshdDirectory}/ssh_host_rsa_key\nPort 8022\n" > "${sshdTmpDirectory}/sshd_config"
$VERBOSE_ECHO "Generating host keys..."
$DRY_RUN_CMD ${pkgs.openssh}/bin/ssh-keygen -t rsa -b 4096 -f "${sshdTmpDirectory}/ssh_host_rsa_key" -N ""
$VERBOSE_ECHO "Writing sshd_config..."
$DRY_RUN_CMD echo -e "HostKey ${sshdDirectory}/ssh_host_rsa_key\nPort 8022\n" > "${sshdTmpDirectory}/sshd_config"
run mv $VERBOSE_ARG "${sshdTmpDirectory}" "${sshdDirectory}"
$DRY_RUN_CMD mv $VERBOSE_ARG "${sshdTmpDirectory}" "${sshdDirectory}"
fi
'';

Expand Down

0 comments on commit da95ee6

Please sign in to comment.