init commit
This commit is contained in:
parent
8005fe750f
commit
3aa67d34b4
BIN
.zshrc.kate-swp
Normal file
BIN
.zshrc.kate-swp
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo ''
|
||||
echo "Disable read-only ? [y/n] (Enables System RW)"
|
||||
echo "Disable read-only & populate keyring ? [y/n] (Enables System RW / AUR packages)"
|
||||
read inputrw
|
||||
if [[ $inputrw =~ ^[Yy]$ ]]; then
|
||||
sudo steamos-readonly disable
|
||||
@ -10,6 +10,102 @@ if [[ $inputrw =~ ^[Yy]$ ]]; then
|
||||
sudo pacman -Syu
|
||||
sudo pacman -Sy archlinux-keyring
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo "Install yay ? [y/n]"
|
||||
read inputyay
|
||||
if [[ $inputjre =~ ^[Yy]$ ]]; then
|
||||
git clone https://aur.archlinux.org/yay-bin.git
|
||||
cd yay-bin
|
||||
git checkout 96f90180a3cf72673b1769c23e2c74edb0293a9f
|
||||
makepkg -si
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo "Install nix ? [y/n]"
|
||||
read inputnix
|
||||
if [[ $inputnix =~ ^[Yy]$ ]]; then
|
||||
{
|
||||
sudo cat << EOF
|
||||
[Unit]
|
||||
Description=Create a `/nix` directory to be used for bind mounting
|
||||
PropagatesStopTo=nix-daemon.service
|
||||
PropagatesStopTo=nix.mount
|
||||
DefaultDependencies=no
|
||||
After=grub-recordfail.service
|
||||
After=steamos-finish-oobe-migration.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=steamos-readonly disable
|
||||
ExecStart=mkdir -vp /nix
|
||||
ExecStart=chmod -v 0755 /nix
|
||||
ExecStart=chown -v root /nix
|
||||
ExecStart=chgrp -v root /nix
|
||||
ExecStart=steamos-readonly enable
|
||||
ExecStop=steamos-readonly disable
|
||||
ExecStop=rmdir /nix
|
||||
ExecStop=steamos-readonly enable
|
||||
RemainAfterExit=true
|
||||
EOF
|
||||
} > /etc/systemd/system/nix-directory.service
|
||||
{
|
||||
sudo cat << EOF
|
||||
[Unit]
|
||||
Description=Mount `/home/nix` on `/nix`
|
||||
PropagatesStopTo=nix-daemon.service
|
||||
PropagatesStopTo=nix-directory.service
|
||||
After=nix-directory.service
|
||||
Requires=nix-directory.service
|
||||
ConditionPathIsDirectory=/nix
|
||||
DefaultDependencies=no
|
||||
|
||||
[Mount]
|
||||
What=/home/nix
|
||||
Where=/nix
|
||||
Type=none
|
||||
DirectoryMode=0755
|
||||
Options=bind
|
||||
EOF
|
||||
} > /etc/systemd/system/nix.mount
|
||||
{
|
||||
sudo cat << EOF
|
||||
[Unit]
|
||||
Description=Ensure Nix related units which are symlinked resolve
|
||||
After=nix.mount
|
||||
Requires=nix-directory.service
|
||||
Requires=nix.mount
|
||||
PropagatesStopTo=nix-directory.service
|
||||
PropagatesStopTo=nix.mount
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/systemctl daemon-reload
|
||||
ExecStart=/usr/bin/systemctl restart --no-block sockets.target timers.target multi-user.target
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
EOF
|
||||
} > /etc/systemd/system/ensure-symlinked-units-resolve.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now ensure-symlinked-units-resolve.service
|
||||
sh <(curl -L https://nixos.org/nix/install) --daemon
|
||||
sudo echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo "Install/Enable pip ? [y/n]"
|
||||
read inputpip
|
||||
if [[ $inputpip =~ ^[Yy]$ ]]; then
|
||||
sudo pacman -S python3
|
||||
wget https://bootstrap.pypa.io/get-pip.py
|
||||
python3 get-pip.py --user --break-system-packages
|
||||
sudo rm get-pip.py
|
||||
fi
|
||||
|
||||
|
||||
echo ''
|
||||
echo "Enable verbose boot ? [y/n]"
|
||||
read inputverbose
|
||||
@ -18,6 +114,7 @@ if [[ $inputverbose =~ ^[Yy]$ ]]; then
|
||||
sudo mv temp_file /etc/grub.d/00_header
|
||||
sudo update-grub
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo "Install/Enable tailscale (VPN) ? [y/n]"
|
||||
read inputvpn
|
||||
@ -28,6 +125,7 @@ if [[ $inputvpn =~ ^[Yy]$ ]]; then
|
||||
source /etc/profile.d/tailscale.sh
|
||||
sudo tailscale up --operator=deck --ssh
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo "Install/Enable no machine (NX) ? [y/n]"
|
||||
read inputrx
|
||||
@ -38,12 +136,14 @@ if [[ $inputrx =~ ^[Yy]$ ]]; then
|
||||
sudo /usr/NX/nxserver --install redhat
|
||||
sudo rm -r /usr/nomachine_8.14.2_1_x86_64.tar.gz
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo "Install Android Tools (adb) ? [y/n]"
|
||||
read inputadb
|
||||
if [[ $inputadb =~ ^[Yy]$ ]]; then
|
||||
sudo pacman -S --noconfirm android-tools
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo "Install Docker ? [y/n]"
|
||||
read inputdocker
|
||||
@ -51,14 +151,7 @@ if [[ $inputdocker =~ ^[Yy]$ ]]; then
|
||||
sudo pacman -S --noconfirm docker
|
||||
systemctl start docker
|
||||
fi
|
||||
echo ''
|
||||
echo "Install/Enable pip ? [y/n]"
|
||||
read inputpip
|
||||
if [[ $inputpip =~ ^[Yy]$ ]]; then
|
||||
wget https://bootstrap.pypa.io/get-pip.py
|
||||
python3 get-pip.py --user --break-system-packages
|
||||
sudo rm get-pip.py
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo "Install JDK 21 ? [y/n]"
|
||||
read inputjre
|
||||
@ -69,12 +162,46 @@ if [[ $inputjre =~ ^[Yy]$ ]]; then
|
||||
JDK_VERSION=21 ./install-jdk-on-steam-deck/scripts/install-jdk.sh && \
|
||||
sudo rm -r ./install-jdk-on-steam-deck
|
||||
fi
|
||||
|
||||
echo ''
|
||||
echo "Install yay ? [y/n]"
|
||||
read inputyay
|
||||
if [[ $inputjre =~ ^[Yy]$ ]]; then
|
||||
git clone https://aur.archlinux.org/yay-bin.git
|
||||
cd yay-bin
|
||||
git checkout 96f90180a3cf72673b1769c23e2c74edb0293a9f
|
||||
makepkg -si
|
||||
echo "Install Oh My Zsh shell ? [y/n]"
|
||||
read inputohmyzsh
|
||||
if [[ $inputohmyzsh =~ ^[Yy]$ ]]; then
|
||||
sudo pacman -S zsh lsd git wget
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||
sed -i 's/^ZSH_THEME=.*$/ZSH_THEME="powerlevel10k\/powerlevel10k"/' ~/.zshrc
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||
sed -i 's/plugins=(\(git\))/plugins=(\n \1\n zsh-autosuggestions\n)/' ~/.zshrc
|
||||
sudo wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20{Regular,Bold,Italic,Bold%20Italic}.ttf -P /usr/share/fonts/MesloLGS/
|
||||
{
|
||||
cat << EOF
|
||||
export WORK_WEEK=\$(date "+%yww%W.%u")
|
||||
export LAN_IP=\$(ip -json route get 8.8.8.8 | jq -r '.[].prefsrc')
|
||||
export TAILSCALE_IP=\$(tailscale status | awk '{print \$1}' | awk 'NR == 1 {print}')
|
||||
|
||||
alias ls='lsd'
|
||||
alias dir='ls -1a'
|
||||
alias cls='clear'
|
||||
alias x='exit'
|
||||
alias n='nano'
|
||||
alias biggest='du . -ha | sort -hr | head -n $1'
|
||||
alias ifconfig="ip add"
|
||||
|
||||
alias nixins='nix-env -iA nixpkgs.$1'
|
||||
alias nixfind='nix search nixpkgs $1'
|
||||
|
||||
alias fpl='flatpak list'
|
||||
|
||||
alias pmins='sudo pacman -S'
|
||||
alias pmuni='sudo pacman -R'
|
||||
alias pmupd='sudo pacman -Sy'
|
||||
alias pmupg='sudo pacman -Syyu'
|
||||
alias pmlst='sudo pacman -Q'
|
||||
alias pmlstin='sudo pacman -Qe'
|
||||
|
||||
alias browser='lynx https://search.1ndev.com/'
|
||||
alias androidscreen="scrcpy -w"
|
||||
EOF
|
||||
} >> ~/.zshrc
|
||||
fi
|
||||
|
@ -1,76 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
{
|
||||
sudo cat << EOF
|
||||
[Unit]
|
||||
Description=Create a `/nix` directory to be used for bind mounting
|
||||
PropagatesStopTo=nix-daemon.service
|
||||
PropagatesStopTo=nix.mount
|
||||
DefaultDependencies=no
|
||||
After=grub-recordfail.service
|
||||
After=steamos-finish-oobe-migration.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=steamos-readonly disable
|
||||
ExecStart=mkdir -vp /nix
|
||||
ExecStart=chmod -v 0755 /nix
|
||||
ExecStart=chown -v root /nix
|
||||
ExecStart=chgrp -v root /nix
|
||||
ExecStart=steamos-readonly enable
|
||||
ExecStop=steamos-readonly disable
|
||||
ExecStop=rmdir /nix
|
||||
ExecStop=steamos-readonly enable
|
||||
RemainAfterExit=true
|
||||
EOF
|
||||
} > /etc/systemd/system/nix-directory.service
|
||||
{
|
||||
sudo cat << EOF
|
||||
[Unit]
|
||||
Description=Mount `/home/nix` on `/nix`
|
||||
PropagatesStopTo=nix-daemon.service
|
||||
PropagatesStopTo=nix-directory.service
|
||||
After=nix-directory.service
|
||||
Requires=nix-directory.service
|
||||
ConditionPathIsDirectory=/nix
|
||||
DefaultDependencies=no
|
||||
|
||||
[Mount]
|
||||
What=/home/nix
|
||||
Where=/nix
|
||||
Type=none
|
||||
DirectoryMode=0755
|
||||
Options=bind
|
||||
EOF
|
||||
} > /etc/systemd/system/nix.mount
|
||||
{
|
||||
sudo cat << EOF
|
||||
[Unit]
|
||||
Description=Ensure Nix related units which are symlinked resolve
|
||||
After=nix.mount
|
||||
Requires=nix-directory.service
|
||||
Requires=nix.mount
|
||||
PropagatesStopTo=nix-directory.service
|
||||
PropagatesStopTo=nix.mount
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/systemctl daemon-reload
|
||||
ExecStart=/usr/bin/systemctl restart --no-block sockets.target timers.target multi-user.target
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
EOF
|
||||
} > /etc/systemd/system/ensure-symlinked-units-resolve.service
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now ensure-symlinked-units-resolve.service
|
||||
|
||||
|
||||
sh <(curl -L https://nixos.org/nix/install) --daemon
|
||||
|
||||
|
||||
sudo echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||
|
||||
# echo "export XDG_DATA_DIRS="$HOME/.nix-profile/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" >>
|
@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
sudo pacman -S zsh lsd git wget
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||
sed -i 's/^ZSH_THEME=.*$/ZSH_THEME="powerlevel10k\/powerlevel10k"/' ~/.zshrc
|
||||
echo "alias ls='lsd'" >> ~/.zshrc
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||
sed -i 's/plugins=(\(git\))/plugins=(\n \1\n zsh-autosuggestions\n)/' ~/.zshrc
|
||||
sudo wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20{Regular,Bold,Italic,Bold%20Italic}.ttf -P /usr/share/fonts/MesloLGS/
|
48
zshrc
48
zshrc
@ -1,48 +0,0 @@
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
export PATH="$HOME/.local/bin:$HOME/.local/jdk:/opt/tailscale:$PATH" ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
plugins=(
|
||||
git
|
||||
zsh-autosuggestions
|
||||
)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
## User Config
|
||||
|
||||
export WORK_WEEK=$(date "+%yww%W.%u")
|
||||
export LAN_IP=$(ip -json route get 8.8.8.8 | jq -r '.[].prefsrc')
|
||||
# export TAILSCALE_IP=$(tailscale status | awk '{print $1}' | awk 'NR == 1 {print}')
|
||||
|
||||
alias ls='lsd'
|
||||
alias dir='ls -1a'
|
||||
alias cls='clear'
|
||||
alias x='exit'
|
||||
alias n='nano'
|
||||
alias biggest='du . -ha | sort -hr | head -n $1'
|
||||
alias ifconfig="ip add"
|
||||
|
||||
alias nixins='nix-env -iA nixpkgs.$1'
|
||||
alias nixfind='nix search nixpkgs $1'
|
||||
|
||||
alias fpl='flatpak list'
|
||||
|
||||
alias pmins='sudo pacman -S'
|
||||
alias pmuni='sudo pacman -R'
|
||||
alias pmupd='sudo pacman -Sy'
|
||||
alias pmupg='sudo pacman -Syyu'
|
||||
alias pmlst='sudo pacman -Q'
|
||||
alias pmlstin='sudo pacman -Qe'
|
||||
|
||||
alias browser='lynx https://search.1ndev.com/'
|
||||
alias androidscreen="scrcpy -w"
|
||||
|
||||
## End of User Config
|
Loading…
Reference in New Issue
Block a user