work/build/user.sh

63 lines
2.0 KiB
Bash
Raw Normal View History

2020-04-11 18:55:50 +00:00
#!/bin/bash
2020-04-11 19:27:32 +00:00
set -x
2020-04-11 18:55:50 +00:00
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
2020-05-26 07:07:46 +00:00
U="user"
2020-04-11 19:18:22 +00:00
2020-05-26 07:07:46 +00:00
export HOME=/home/user
export USER=user
2020-04-11 23:11:49 +00:00
export LC_ALL=en_US
export LANG=en_US.UTF-8
2020-04-11 18:55:50 +00:00
# original home
2020-04-11 19:18:22 +00:00
OH="/hosthome"
2020-04-11 18:55:50 +00:00
# link ~/.home to original home
2020-04-11 19:18:22 +00:00
ln -s "/hosthome" $HOME/.home
2020-04-11 18:55:50 +00:00
2020-05-26 07:07:46 +00:00
#vim -s ~/.vimrc -c 'q!'
2020-04-11 20:55:42 +00:00
# vim-plug
# this should happen from vimrc
#curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
# https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
2020-04-11 20:55:42 +00:00
2020-05-26 07:07:46 +00:00
# /nix is already created for us and chowned to us by now:
curl -L https://nixos.org/nix/install | sh
2020-04-11 23:11:49 +00:00
2020-05-26 07:07:46 +00:00
source /home/user/.nix-profile/etc/profile.d/nix.sh
2020-04-11 23:11:49 +00:00
2020-05-26 07:07:46 +00:00
# this should install all the packages from the config.nix:
2020-05-26 07:35:49 +00:00
nix-env -i myPackages
2020-05-26 07:07:46 +00:00
# FIXME have this pull from synced dir instead
# oh-my-zsh
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/installomz.sh
export ZSH="$HOME/.zsh"
2020-07-08 07:26:10 +00:00
export KEEP_ZSHRC=yes
2020-05-26 07:07:46 +00:00
zsh /tmp/installomz.sh && rm /tmp/installomz.sh
2020-05-16 11:28:48 +00:00
###############################################################################
##### Personal Config
###############################################################################
# I had envisioned this image as adaptable to other users but I've decided
# to abandon that hope and hardcode my own values in here.
git config --global user.email sneak@sneak.berlin
git config --global user.name sneak
2020-05-26 07:07:46 +00:00
mkdir -p ~/.paths
# TODO FIXME change the syncthing paths on las1 when convenient sometime
ln -s ~/.home/Documents/syncthing/folders/sync ~/.paths/sneak-sync
ln -s ~/.home/Documents/syncthing/folders/scratch ~/.paths/sneak-scratch
ln -s ~/.home/Documents/syncthing/folders/sneak-docs ~/.paths/sneak-docs
ln -s ~/.paths/sneak-docs ~/Documents
ln -s ~/.paths/sneak-scratch/dev ~/dev
ln -s ~/.paths/sneak-sync/dotfiles/weechat ~/.weechat
ln -s ~/.paths/sneak-sync/ssh/config ~/.ssh/config
# link in ssh key from original home
mkdir -p ~/.ssh
ln -s ~/.paths/sneak-sync/secrets/ssh/pixel16/id_rsa ~/.ssh/id_rsa
ln -s ~/.paths/sneak-sync/secrets/ssh/pixel16/id_rsa.pub ~/.ssh/id_rsa.pub