dotfiles/nixos/up.sh

53 lines
1.4 KiB
Bash
Raw Normal View History

2019-03-26 09:55:52 +00:00
#!/usr/bin/env bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR=`realpath "$DIR/../"`
CURL="curl -sSfL"
if [[ -z $DIR ]]; then
echo "please set DIR"
exit 1
fi
DIR=`realpath $DIR`
echo "using $DIR as the top level directory"
cd $DIR
git submodule update --init --recursive
2019-07-05 23:11:21 +01:00
ln -vfs "$DIR/.gitconfig.linux.private" ~/.gitconfig
2019-03-26 09:55:52 +00:00
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
cp -v "$DIR/keeweb.desktop" ~/.local/share/applications/
ln -vfs "$DIR/tools" ~/
echo "all links done"
set +e
rustup update
set -e
rustup install stable
set +e
rustup install nightly
set -e
rustup default stable
(test -x "${HOME}/.cargo/bin/cargo-install-update" || nix-shell -p gcc pkgconfig zlib openssl --run "cargo install cargo-update" )
(test -x "${HOME}/.cargo/bin/rg" || cargo install ripgrep)
(test -x "${HOME}/.cargo/bin/fd" || cargo install fd-find)
(test -x "${HOME}/.cargo/bin/genpass" || cargo install genpass)
set +e
nix-shell -p gcc pkgconfig zlib openssl --run "cargo install-update -a"
set -e
nix-shell -p gcc pkgconfig zlib openssl --run "rustup run nightly cargo install-update -a"
nix-channel --add https://github.com/rycee/home-manager/archive/release-19.03.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install
2019-03-26 09:55:52 +00:00