-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup
executable file
·29 lines (26 loc) · 1.01 KB
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
# shellcheck disable=SC2046
# Debug:
# gh cs cp -e remote:/workspaces/.codespaces/.persistedshare/creation.log .
# less creation.log
set -e
[ ! -d ~/.git ]
cd "$(dirname "$(readlink -f "$0")")/.."
sudo sed -i s=/bin/bash=/bin/zsh=g /etc/passwd
sudo sed -i s/archive.ubuntu.com/mirrors.ustc.edu.cn/g /etc/apt/sources.list
echo "$USER:U6aMy0wojraho" | sudo chpasswd -e
echo root:U6aMy0wojraho | sudo chpasswd -e
# https://github.com/NixOS/nix/issues/6680
sudo apt-get -y update
sudo apt-get -y install acl librime1
sudo setfacl -k /tmp
# `git reset --hard` avoid nix installer add some lines to .bashrc and .zshrc
sh -c "$(curl -fsSL https://mirrors.bfsu.edu.cn/nix/latest/install)"
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
# CWD: /workspaces/.codespaces/.persistedshare/dotfiles
cp -r .git ~
cd
git reset --hard
nix-env -iA nixpkgs.{neovim,tmux,vivid,eza,bat,ripgrep,fd,delta,fzf,zsh-powerlevel10k,chafa,parallel,exiftool}
sudo ln -sf ~/.nix-profile/bin/nvim /usr/bin/vi
source script/install_plugins.sh