podmanのインストールを追加

btrfs時のswapfileのセットアップを更新
パッケージインストール時のnoconfirmを追加
This commit is contained in:
suti7yk5032 2024-07-28 01:26:28 +09:00
parent cfca845ed8
commit 7e39571b0c

View file

@ -20,7 +20,7 @@ function install_zsh () {
chsh -s /usr/bin/zsh chsh -s /usr/bin/zsh
fi fi
yay -S ttf-meslo-nerd-font-powerlevel10k yay -S --noconfirm ttf-meslo-nerd-font-powerlevel10k
curl --proto '=https' -fLsS https://rossmacarthur.github.io/install/crate.sh | bash -s -- --repo rossmacarthur/sheldon --to ~/.local/bin curl --proto '=https' -fLsS https://rossmacarthur.github.io/install/crate.sh | bash -s -- --repo rossmacarthur/sheldon --to ~/.local/bin
@ -33,7 +33,7 @@ function install_zsh () {
echo 'eval "$(sheldon source)"' | tee -a "$HOME/.zshrc" echo 'eval "$(sheldon source)"' | tee -a "$HOME/.zshrc"
sheldon add zsh-completions --github zsh-users/zsh-completions sheldon add zsh-completions --github zsh-users/zsh-completions
sheldon add zsh-autocomplete --github marlonrichert/zsh-autocomplete sheldon add zsh-autocomplete --github marlonrichert/zsh-autocomplete --tag 23.07.13
sheldon add zsh-autosuggestions --github zsh-users/zsh-autosuggestions --use '{{ name }}.zsh' sheldon add zsh-autosuggestions --github zsh-users/zsh-autosuggestions --use '{{ name }}.zsh'
sheldon add zsh-syntax-highlighting --github zsh-users/zsh-syntax-highlighting sheldon add zsh-syntax-highlighting --github zsh-users/zsh-syntax-highlighting
sheldon add powerlevel10k --github romkatv/powerlevel10k sheldon add powerlevel10k --github romkatv/powerlevel10k
@ -44,14 +44,14 @@ function setup_swapfile () {
printf "Please enter swapfile capacity (example : ~ M)\n" printf "Please enter swapfile capacity (example : ~ M)\n"
read -r swapcap read -r swapcap
if [ "$1" == "btrfs" ]; then if [ "$1" == "btrfs" ]; then
sudo truncate -s 0 /swapfile sudo truncate -s 0 /swap/swapfile
sudo chattr +C /swapfile sudo chattr +C /swap/swapfile
sudo fallocate -l "$swapcap"M /swapfile sudo fallocate -l "$swapcap"M /swap/swapfile
sudo chmod 600 /swapfile sudo chmod 600 /swap/swapfile
sudo mkswap /swapfile sudo mkswap /swap/swapfile
sudo swapon /swapfile sudo swapon /swap/swapfile
echo "#swapfile_autogenerated" | sudo tee -a /etc/fstab echo "#swapfile_autogenerated" | sudo tee -a /etc/fstab
echo "/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab echo "/swap/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab
else else
sudo dd if=/dev/zero of=/swapfile bs=1M count="$swapcap" status=progress sudo dd if=/dev/zero of=/swapfile bs=1M count="$swapcap" status=progress
sudo chmod 600 /swapfile sudo chmod 600 /swapfile
@ -78,7 +78,7 @@ function install_yay () {
sudo pacman -S --noconfirm git sudo pacman -S --noconfirm git
git clone https://aur.archlinux.org/yay.git git clone https://aur.archlinux.org/yay.git
cd yay || exit cd yay || exit
makepkg -si makepkg -si --noconfirm
cd "$HOME" || exit cd "$HOME" || exit
} }
@ -94,6 +94,15 @@ function install_ca () {
sudo trust anchor ./tx1310m3_CA.pem sudo trust anchor ./tx1310m3_CA.pem
} }
function install_podman () {
sudo pacman -S --noconfirm podman podman-compose podman-docker aardvark-dns
echo 'export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock"' | sudo tee -a /etc/environment
mkdir ~/.config/containers
echo "unqualified-search-registries = [\"docker.io\"]" >> ~/.config/containers/registries.conf
systemctl --user enable podman.socket
sudo loginctl enable-linger $UID
}
printf "Do you want to the initial setup? (yes or no)\n" printf "Do you want to the initial setup? (yes or no)\n"
read -r temp read -r temp
@ -112,6 +121,7 @@ if [ "$temp" == "yes" ]; then
install_fonts install_fonts
install_yay install_yay
install_zsh install_zsh
install_podman
install_ca install_ca
printf "Finished.\n" printf "Finished.\n"