testing
Some checks failed
continuous-integration/drone/push Build was killed

This commit is contained in:
2020-04-11 11:55:50 -07:00
parent 5f644c5945
commit 09ccfe26fd
10 changed files with 301 additions and 8 deletions

View File

@@ -1,4 +1,3 @@
apt-transport-https
apt-utils
aspell

View File

@@ -5,3 +5,27 @@ TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
cd "$TD"
apt install -y $(cat packages.txt)
SSH_HOST_KEY_FILES="
ssh_host_ecdsa_key
ssh_host_ecdsa_key.pub
ssh_host_ed25519_key
ssh_host_ed25519_key.pub
ssh_host_rsa_key
ssh_host_rsa_key.pub
"
for FN in $SSH_HOST_KEY_FILES ; do
ln -s /hostroot/etc/ssh/$FN /etc/ssh/$FN
done
# install other stuff here
# update pip
# install black
# install python packages
# install yarn
# install prettier
# install vim-go
sudo -u $USERNAME_TO_ADD bash ./runuser.sh

26
setup/runuser.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
# original home
OH="/hostroot/home/$USER_TO_ADD"
# container home
export HOME="/home/$USER_TO_ADD"
rsync -avP /home/template/ $HOME/
# link ~/.home to original home
ln -s "/hostroot/home/$USER_TO_ADD" $HOME/.home
# oh-my-zsh
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/installomz.sh
export ZSH="$HOME/.zsh"
bash /tmp/installomz.sh --unattended --keep-zshrc
# link in ssh key from original home
ln -s ~/.home/.ssh/id_rsa ~/.ssh/id_rsa
ln -s ~/.home/.ssh/id_rsa.pub ~/.ssh/id_rsa.pub
# move this to runtime
#DEVDIR="$( cd ~/.home/dev >/dev/null 2>&1 && pwd -P)"