mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-25 21:30:52 +01:00
add ssh stuff to persistent
This commit is contained in:
parent
32e78a8423
commit
941dc4fc23
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,14 @@ pkgs.writeShellScriptBin "bootstrap-machine" ''
|
|||
# Set the correct permissions so sshd will accept the key
|
||||
chmod 600 "$temp/etc/ssh/ssh_host_ed25519_key"
|
||||
|
||||
ssh-keygen -f "$temp/etc/ssh/ssh_host_ed25519_key" -y > "$temp/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
|
||||
chmod 644 "$temp/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
|
||||
mkdir -p "$temp/persistent"
|
||||
|
||||
cp -r "$temp/ssh" "$temp/persistent/ssh"
|
||||
|
||||
nixos-anywhere --extra-files "$temp" --store-paths $(nix-build -A nixosConfigurations.\"$machine\".config.system.build.diskoScript) $(nix-build -A nixosConfigurations.\"$machine\".config.system.build.toplevel) "''${extra_args[@]}" root@"$ip"
|
||||
popd
|
||||
''
|
||||
|
|
Loading…
Add table
Reference in a new issue