Compare commits
9 Commits
412d2a43f5
...
9571ade0c1
Author | SHA1 | Date |
---|---|---|
Ray Elliott | 9571ade0c1 | |
Ray Elliott | 46124691f4 | |
Ray Elliott | 6191a197ee | |
Ray Elliott | a67a15bbe0 | |
Ray Elliott | 0518d20daa | |
Ray Elliott | b75bfee984 | |
Ray Elliott | 3fb4ee98f4 | |
Ray Elliott | 59e3fe422d | |
Ray Elliott | e7e1a2b990 |
|
@ -0,0 +1,5 @@
|
|||
export _url="hugo-skeleton.home"
|
||||
export _user='ray'
|
||||
|
||||
export _node_version=v12.16.1
|
||||
export _node_distro=linux-x64
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if command -v apt-get ; then
|
||||
apt-get -y install tmux git
|
||||
else
|
||||
echo "Error - no package installer found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p /home/"$_user"/.config
|
||||
cd /home/"$_user"
|
||||
rm -Rf .config/tmux
|
||||
if [ -h .tmux ] ; then
|
||||
rm .tmux
|
||||
elif [ -f .tmux ] ; then
|
||||
mv .tmux .tmux.backup
|
||||
fi
|
||||
su ray -c 'git clone https://git.rayelliott.dev/dots/tmux.git .config/tmux'
|
||||
su ray -c 'ln -bfs .config/tmux/tmux.conf .tmux.conf'
|
||||
su ray -c 'ln -bfs .config/tmux/tmux .tmux'
|
||||
cd .config/tmux
|
||||
ln -bfs tmux.colours-base16.conf tmux.colours.conf
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if command -v apt-get ; then
|
||||
apt-get -y install zsh git
|
||||
else
|
||||
echo "Error - no package installer found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# clone configuration
|
||||
mkdir -p /home/"$_user"/.config
|
||||
cd /home/"$_user"
|
||||
rm -Rf .config/zsh
|
||||
su ray -c 'git clone https://git.rayelliott.dev/dots/zsh.git .config/zsh'
|
||||
su ray -c 'git clone https://github.com/tarjoilija/zgen.git .config/zsh/zgen'
|
||||
su ray -c 'ln -bfs .config/zsh/zshrc .zshrc'
|
||||
|
||||
# set interactive shell
|
||||
_zsh=$(command -v zsh)
|
||||
if [ -f "$_zsh" ] ; then
|
||||
chsh ray -s "$_zsh"
|
||||
fi
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" ] ; then
|
||||
echo "deploy-script.sh: Error - Must supply script as argument"
|
||||
exit
|
||||
else
|
||||
_script="$1"
|
||||
fi
|
||||
|
||||
. ./config.sh
|
||||
|
||||
cat config.sh "$_script" | ssh root@"$_url" "cat >/tmp/deploy-script.sh"
|
||||
ssh root@"$_url" '/bin/bash /tmp/deploy-script.sh'
|
||||
ssh root@"$_url" '/bin/bash -c "rm /tmp/deploy-script.sh"'
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if command -v apt-get ; then
|
||||
apt-get -y install gnupg
|
||||
else
|
||||
echo "Error - no package installer found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd /tmp
|
||||
wget https://nodejs.org/dist/"$_node_version"/node-"$_node_version"-"$_node_distro".tar.xz
|
||||
sudo mkdir -p /usr/local/lib/nodejs
|
||||
tar -xJvf node-"$_node_version"-"$_node_distro".tar.xz -C /usr/local/lib/nodejs
|
||||
|
||||
echo "PATH=/usr/local/lib/nodejs/node-$_node_version-$_node_distro/bin:$PATH" >> /home/"$_user"/.profile
|
||||
|
||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
apt-get update && sudo apt-get -y install yarn
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if command -v apt-get ; then
|
||||
apt-get -y install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip
|
||||
cd /tmp
|
||||
git clone https://github.com/neovim/neovim
|
||||
cd neovim
|
||||
make CMAKE_BUILD_TYPE=Release
|
||||
mv /tmp/neovim/runtime /usr/local/share/nvim
|
||||
mv /tmp/neovim/build/bin/nvim /usr/local/bin/nvim
|
||||
else
|
||||
echo "Error - no package installer found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p /home/"$_user"/.config
|
||||
cd /home/"$_user"
|
||||
rm -Rf .config/nvim
|
||||
su ray -c 'git clone https://git.rayelliott.dev/dots/nvim.git .config/nvim'
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
useradd -m -s /bin/bash "$_user"
|
||||
groupadd sudo
|
||||
usermod -aG sudo "$_user"
|
||||
mkdir /home/"$_user"/.ssh
|
||||
cp /root/.ssh/authorized_keys /home/"$_user"/.ssh/
|
||||
chown "$_user": /home/"$_user"/.ssh/authorized_keys
|
||||
passwd -d "$_user"
|
||||
chage -d 0 "$_user"
|
||||
|
||||
if command -v apt-get ; then
|
||||
apt-get update && apt-get -y upgrade && apt-get -y install sudo
|
||||
else
|
||||
echo "Error - no package installer found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# TODO ensure group sudo is allowed sudo
|
Reference in New Issue