Compare commits
1 Commits
main
...
93c603e417
| Author | SHA1 | Date | |
|---|---|---|---|
|
93c603e417
|
@@ -19,9 +19,11 @@ Server = http://mirrors.cat.net/archlinux/$repo/os/$arch' > $ROOTFS/etc/pacman.d
|
||||
sed -i 's/CheckSpace/#CheckSpace/' $ROOTFS/etc/pacman.conf
|
||||
|
||||
arch-chroot $ROOTFS /bin/sh -c 'pacman-key --init && pacman-key --populate archlinux'
|
||||
arch-chroot $ROOTFS /bin/sh -c 'pacman -Syu --noconfirm base-devel vim git zsh rust openssh jq nodejs npm'
|
||||
arch-chroot $ROOTFS /bin/sh -c 'pacman -Syu --noconfirm base-devel vim git zsh rust openssh jq nodejs npm zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search'
|
||||
arch-chroot $ROOTFS /bin/sh -c 'npm i -g @anthropic-ai/claude-code'
|
||||
|
||||
bash cfg/pkg.sh $ROOTFS
|
||||
|
||||
arch-chroot $ROOTFS /bin/sh -c 'useradd -m -G wheel -s /bin/zsh ai'
|
||||
arch-chroot $ROOTFS /bin/sh -c 'echo "ai:ai" | chpasswd'
|
||||
echo "ai ALL=(ALL:ALL) NOPASSWD: ALL" >> $ROOTFS/etc/sudoers
|
||||
|
||||
13
cfg/pkg.sh
Executable file
13
cfg/pkg.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ROOTFS="$1"
|
||||
|
||||
arch-chroot $ROOTFS /bin/sh -c '
|
||||
cd /tmp
|
||||
git clone https://git.syui.ai/ai/gpt && cd gpt && cargo build --release && cp target/release/aigpt /usr/local/bin/ && cd ..
|
||||
git clone https://git.syui.ai/ai/log && cd log && cargo build --release && cp target/release/ailog /usr/local/bin/ && cd ..
|
||||
git clone https://git.syui.ai/ai/shell && cd shell && cargo build --release && cp target/release/aishell /usr/local/bin/ && cd ..
|
||||
rm -rf gpt log shell
|
||||
'
|
||||
21
cfg/zshrc
21
cfg/zshrc
@@ -1,14 +1,23 @@
|
||||
export EDITOR=vim
|
||||
export LANG=en_US.UTF-8
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
export PATH=$HOME/.cargo/bin:$PATH
|
||||
|
||||
alias u="sudo pacman -Syu --noconfirm"
|
||||
alias zs="vim ~/.zshrc"
|
||||
alias zr="exec $SHELL && source ~/.zshrc"
|
||||
alias claude='claude --dangerously-skip-permissions'
|
||||
alias c='claude --dangerously-skip-permissions'
|
||||
|
||||
autoload -Uz promptinit && promptinit && prompt adam1
|
||||
autoload -Uz compinit && compinit
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
fpath=(/usr/share/zsh/site-functions $fpath)
|
||||
|
||||
#source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
|
||||
HISTFILE=~/.zsh_history
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
HISTFILE=~/.zsh_history
|
||||
setopt SHARE_HISTORY
|
||||
setopt HIST_IGNORE_DUPS
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
Reference in New Issue
Block a user