more secrets
This commit is contained in:
parent
fa0974cb63
commit
5fd3d3a40a
8 changed files with 119 additions and 13 deletions
|
@ -10,14 +10,14 @@
|
|||
};
|
||||
script = ''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
if [ ! -f /home/${settings.user.username}/.ssh/id_ed25519bbb ]; then
|
||||
if [ ! -f /home/${settings.user.username}/.ssh/id_ed25519]; then
|
||||
if [ -v DRY_RUN ]; then
|
||||
echo "DRY_RUN is set. Would generate SSH key for ${settings.user.username}."
|
||||
else
|
||||
echo "Generating SSH key for ${settings.user.username}."
|
||||
mkdir -p /home/${settings.user.username}/.ssh
|
||||
chmod 700 /home/${settings.user.username}/.ssh
|
||||
/run/current-system/sw/bin/ssh-keygen -t ed25519 -f /home/${settings.user.username}/.ssh/id_ed25519bbb -N ""
|
||||
/run/current-system/sw/bin/ssh-keygen -t ed25519 -f /home/${settings.user.username}/.ssh/id_ed25519-N ""
|
||||
fi
|
||||
else
|
||||
echo "SSH key already exists for ${settings.user.username}."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue