2019-03-26 09:55:52 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
DIR=`realpath "$DIR/../"`
|
|
|
|
|
|
|
|
if [[ -z $DIR ]]; then
|
|
|
|
echo "please set DIR"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-05-19 18:10:36 +01:00
|
|
|
HOST=`hostname`
|
2019-03-26 09:55:52 +00:00
|
|
|
DIR=`realpath $DIR`
|
|
|
|
echo "using $DIR as the top level directory"
|
|
|
|
cd $DIR
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
|
|
|
mkdir -p ~/.config/Code/User
|
|
|
|
ln -vfs "$DIR/.config/Code/User/settings.json" ~/.config/Code/User/settings.json
|
|
|
|
ln -vfs "$DIR/.config/Code/User/keybindings.json" ~/.config/Code/User/keybindings.json
|
|
|
|
mkdir -p ~/.local/share/applications
|
|
|
|
ln -vfs "$DIR/tools" ~/
|
2020-05-19 18:10:36 +01:00
|
|
|
ln -vsf "$DIR/nixos/boxes/$HOST/home.nix" ~/.config/nixpkgs/home.nix
|
|
|
|
sudo ln -vsf "$DIR/nixos/boxes/$HOST/configuration.nix" /etc/nixos/configuration.nix
|
2019-03-26 09:55:52 +00:00
|
|
|
echo "all links done"
|
|
|
|
|
2020-06-06 12:42:34 +01:00
|
|
|
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
|
|
|
nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager
|
2019-07-04 21:35:02 +01:00
|
|
|
nix-channel --update
|
|
|
|
nix-shell '<home-manager>' -A install
|
2019-03-26 09:55:52 +00:00
|
|
|
|