1 parent eb3c7aa commit e16ce80Copy full SHA for e16ce80
1 file changed
machines/aarch64/android/common.nix
@@ -4,7 +4,7 @@
4
home.file.".ssh/sshd_config" = {
5
text = ''
6
Port 8022
7
- HostKey ${config.home.homeDirectory}/.ssh/id_ed25519
+ HostKey ${config.home.homeDirectory}/.ssh/sshd_host_ed25519_key
8
AuthorizedKeysFile .ssh/authorized_keys
9
PasswordAuthentication yes
10
PermitEmptyPasswords no
@@ -14,6 +14,13 @@
14
'';
15
};
16
17
+ home.activation.generateSshdHostKey = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
18
+ HOST_KEY="${config.home.homeDirectory}/.ssh/sshd_host_ed25519_key"
19
+ if [ ! -f "$HOST_KEY" ]; then
20
+ ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -f "$HOST_KEY" -N ""
21
+ fi
22
+ '';
23
+
24
home.file.".termux/boot/start-sshd.sh" = {
25
26
#!/bin/sh
0 commit comments