parent
c9951e3774
commit
1641ade4b2
2 changed files with 8 additions and 2 deletions
|
@ -23,9 +23,13 @@ in {
|
|||
# Set your time zone
|
||||
time.timeZone = "Europe/Rome";
|
||||
|
||||
build.activation.sshd = ''
|
||||
build.activation.sshd = let
|
||||
hosts = (builtins.import ../../lib).keys.hosts;
|
||||
in ''
|
||||
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${config.user.home}/.ssh"
|
||||
$DRY_RUN_CMD cat ${pathToPubKey} > "${config.user.home}/.ssh/authorized_keys"
|
||||
$DRY_RUN_CMD echo ${hosts.picard} > "${config.user.home}/.ssh/authorized_keys"
|
||||
$DRY_RUN_CMD echo ${hosts.sisko} >> "${config.user.home}/.ssh/authorized_keys"
|
||||
$DRY_RUN_CMD echo ${hosts.kirk} >> "${config.user.home}/.ssh/authorized_keys"
|
||||
|
||||
if [[ ! -d "${sshdDirectory}" ]]; then
|
||||
$DRY_RUN_CMD rm $VERBOSE_ARG --recursive --force "${sshdTmpDirectory}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue