Compare commits
No commits in common. "873a8614ad25bcc15f994abfacc7dabbe766b2b4" and "cfca845ed823354839b738244d9a077499289407" have entirely different histories.
873a8614ad
...
cfca845ed8
3 changed files with 29 additions and 50 deletions
|
@ -20,7 +20,7 @@ function install_zsh () {
|
||||||
chsh -s /usr/bin/zsh
|
chsh -s /usr/bin/zsh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
yay -S --noconfirm ttf-meslo-nerd-font-powerlevel10k
|
yay -S 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 --tag 23.07.13
|
sheldon add zsh-autocomplete --github marlonrichert/zsh-autocomplete
|
||||||
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 /swap/swapfile
|
sudo truncate -s 0 /swapfile
|
||||||
sudo chattr +C /swap/swapfile
|
sudo chattr +C /swapfile
|
||||||
sudo fallocate -l "$swapcap"M /swap/swapfile
|
sudo fallocate -l "$swapcap"M /swapfile
|
||||||
sudo chmod 600 /swap/swapfile
|
sudo chmod 600 /swapfile
|
||||||
sudo mkswap /swap/swapfile
|
sudo mkswap /swapfile
|
||||||
sudo swapon /swap/swapfile
|
sudo swapon /swapfile
|
||||||
echo "#swapfile_autogenerated" | sudo tee -a /etc/fstab
|
echo "#swapfile_autogenerated" | sudo tee -a /etc/fstab
|
||||||
echo "/swap/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab
|
echo "/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 --noconfirm
|
makepkg -si
|
||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,15 +94,6 @@ 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
|
||||||
|
|
||||||
|
@ -121,7 +112,6 @@ 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"
|
||||||
|
|
|
@ -30,7 +30,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 --tag 23.07.13
|
sheldon add zsh-autocomplete --github marlonrichert/zsh-autocomplete
|
||||||
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
|
||||||
|
@ -41,14 +41,14 @@ function setup_swapfile () {
|
||||||
printf "Please enter swapfile capacity (example : ~ M)\n"
|
printf "Please enter swapfile capacity (example : ~ M)\n"
|
||||||
read swapcap
|
read swapcap
|
||||||
if [ "$1" == "btrfs" ]; then
|
if [ "$1" == "btrfs" ]; then
|
||||||
sudo truncate -s 0 /swap/swapfile
|
sudo truncate -s 0 /swapfile
|
||||||
sudo chattr +C /swap/swapfile
|
sudo chattr +C /swapfile
|
||||||
sudo fallocate -l "$swapcap"M /swap/swapfile
|
sudo fallocate -l "$swapcap"M /swapfile
|
||||||
sudo chmod 600 /swap/swapfile
|
sudo chmod 600 /swapfile
|
||||||
sudo mkswap /swap/swapfile
|
sudo mkswap /swapfile
|
||||||
sudo swapon /swap/swapfile
|
sudo swapon /swapfile
|
||||||
echo "#swapfile_autogenerated" | sudo tee -a /etc/fstab
|
echo "#swapfile_autogenerated" | sudo tee -a /etc/fstab
|
||||||
echo "/swap/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab
|
echo "/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
|
||||||
|
@ -75,7 +75,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
|
cd yay
|
||||||
makepkg -si --noconfirm
|
makepkg -si
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ function install_fonts () {
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_podman () {
|
function install_podman () {
|
||||||
sudo pacman -S --noconfirm podman podman-compose podman-docker aardvark-dns
|
sudo pacman -S podman podman-compose podman-docker aardvark-dns
|
||||||
echo 'export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock"' | sudo tee -a /etc/environment
|
echo 'export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock"' | sudo tee -a /etc/environment
|
||||||
mkdir ~/.config/containers
|
mkdir ~/.config/containers
|
||||||
echo "unqualified-search-registries = [\"docker.io\"]" >> ~/.config/containers/registries.conf
|
echo "unqualified-search-registries = [\"docker.io\"]" >> ~/.config/containers/registries.conf
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
loadkeys jp106
|
loadkeys jp106
|
||||||
#キーボードを日本語配列へ変更
|
#キーボードを日本語配列へ変更
|
||||||
printf "\nPlease enter your username\n"
|
printf "Please enter your username\n\n"
|
||||||
read -r home_username
|
read -r home_username
|
||||||
printf "Please enter your password\n"
|
printf "Please enter your password\n\n"
|
||||||
read -sr home_password
|
read -sr home_password
|
||||||
printf "Please enter Hostname\n"
|
printf "Please enter Hostname\n\n"
|
||||||
read -r hostname1
|
read -r hostname1
|
||||||
|
|
||||||
fdisk -l
|
fdisk -l
|
||||||
#ディスク一覧表示
|
#ディスク一覧表示
|
||||||
printf "\nWhat disk do you want to install to? example:/dev/sda \n"
|
printf "\nWhat disk do you want to install to? example:/dev/sda \n\n"
|
||||||
read -r installdisk
|
read -r installdisk
|
||||||
printf "Choose the file system to use for your root partition. (ext4, btrfs)\n"
|
printf "\nChoose the file system to use for your root partition. (ext4, btrfs)\n\n"
|
||||||
read -r filesystem
|
read -r filesystem
|
||||||
printf "Choose the kernel you want to use. (linux, zen, lts)\n"
|
printf "\nChoose the kernel you want to use. (linux, zen, lts)\n\n"
|
||||||
read -r kernel
|
read -r kernel
|
||||||
#インストールするディスクを入力
|
#インストールするディスクを入力
|
||||||
printf "%s (%s) is selected as the disk to install. Are you sure you want to perform the partition operation? (yes or no) \n" "$installdisk" "$filesystem"
|
printf "%s (%s) is selected as the disk to install. Are you sure you want to perform the partition operation? (yes or no) \n\n" "$installdisk" "$filesystem"
|
||||||
read -r check1
|
read -r check1
|
||||||
#インストールするディスクを確認
|
#インストールするディスクを確認
|
||||||
if [ "$check1" == "yes" ]; then
|
if [ "$check1" == "yes" ]; then
|
||||||
|
@ -40,24 +40,13 @@ if [ "$check1" == "yes" ]; then
|
||||||
mkfs.vfat -F32 "$d1"
|
mkfs.vfat -F32 "$d1"
|
||||||
if [ "$filesystem" == "ext4" ]; then
|
if [ "$filesystem" == "ext4" ]; then
|
||||||
mkfs.ext4 "$d2"
|
mkfs.ext4 "$d2"
|
||||||
mount "$d2" /mnt
|
|
||||||
elif [ "$filesystem" == "btrfs" ]; then
|
elif [ "$filesystem" == "btrfs" ]; then
|
||||||
mkfs.btrfs -f "$d2"
|
mkfs.btrfs -f "$d2"
|
||||||
mount "$d2" /mnt
|
|
||||||
btrfs subvolume create /mnt/@
|
|
||||||
btrfs subvolume create /mnt/@home
|
|
||||||
btrfs subvolume create /mnt/@swap
|
|
||||||
umount "$d2"
|
|
||||||
mount "$d2" /mnt -o subvol=@
|
|
||||||
mkdir /mnt/home
|
|
||||||
mkdir /mnt/swap
|
|
||||||
mount "$d2" /mnt/home -o subvol=@home
|
|
||||||
mount "$d2" /mnt/swap -o subvol=@swap
|
|
||||||
else
|
else
|
||||||
mkfs.ext4 "$d2"
|
mkfs.ext4 "$d2"
|
||||||
mount "$d2" /mnt
|
|
||||||
fi
|
fi
|
||||||
#フォーマット
|
#フォーマット
|
||||||
|
mount "$d2" /mnt
|
||||||
mkdir /mnt/boot
|
mkdir /mnt/boot
|
||||||
mount "$d1" /mnt/boot
|
mount "$d1" /mnt/boot
|
||||||
#マウント
|
#マウント
|
||||||
|
|
Loading…
Reference in a new issue