This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
apt-transport-https
|
||||
apt-utils
|
||||
aspell
|
||||
|
||||
24
setup/run.sh
24
setup/run.sh
@@ -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
26
setup/runuser.sh
Normal 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)"
|
||||
Reference in New Issue
Block a user