Update README
This commit is contained in:
12
README.md
12
README.md
@@ -15,6 +15,10 @@ This scripts need to be launched as root
|
||||
- Change DISK variable to the install.sh script with your favourite editor.
|
||||
- Launch script
|
||||
|
||||
```
|
||||
/usr/local/share/dotfiles/install.sh
|
||||
```
|
||||
|
||||
## For testing purpose (kvm only)
|
||||
|
||||
You can share filesystem from host to guest (https://wiki.archlinux.org/title/Libvirt#Sharing_data_between_host_and_guest) :
|
||||
@@ -22,7 +26,8 @@ You can share filesystem from host to guest (https://wiki.archlinux.org/title/Li
|
||||
Share scripts :
|
||||
|
||||
```
|
||||
mount -t 9p scripts /opt
|
||||
mkdir -p /usr/local/share/dotfiles
|
||||
mount -t 9p scripts /usr/local/share/dotfiles
|
||||
```
|
||||
|
||||
Share pacman cache :
|
||||
@@ -33,4 +38,7 @@ mount -t 9p pkgs /var/cache/pacman/pkg
|
||||
|
||||
## Arch configuration
|
||||
|
||||
git with output to /usr/local/hsare/dotfiles
|
||||
```
|
||||
git git clone https://git.unixyourbrain.org/beastie/arch-custom.git /usr/local/share/dotfiles
|
||||
/usr/local/share/dotfiles/configure.sh
|
||||
```
|
||||
|
||||
6
TODO
6
TODO
@@ -1,8 +1,4 @@
|
||||
install steam, wine and lib32 multilib
|
||||
pipwire-pulseaudio as root to X11
|
||||
dynamic colors
|
||||
dmenu
|
||||
picom
|
||||
dunst
|
||||
polybar
|
||||
color to kernel cmdline
|
||||
color to kernel cmdline
|
||||
|
||||
48
install.sh
48
install.sh
@@ -5,26 +5,26 @@ set -e
|
||||
DISK="/dev/vda"
|
||||
MOUNTOPTS="defaults,ssd,compress=zstd,autodefrag,noatime"
|
||||
PACSTRAP_EXTRA_ARGS="-c"
|
||||
#Switch to the script directory
|
||||
### Switch to the script directory
|
||||
cd "$(dirname "$0")"
|
||||
DIRNAME="$(pwd)"
|
||||
|
||||
# Format disk
|
||||
### Format disk
|
||||
sgdisk --clear \
|
||||
--new=1:0:+1024MiB --typecode=1:ef00 --change-name=1:EFI \
|
||||
--new=2:0:0 --typecode=2:8309 --change-name=2:SYS \
|
||||
"$DISK"
|
||||
partprobe "$DISK"
|
||||
|
||||
#Create Luks partition
|
||||
### Create Luks partition
|
||||
printf "%s\n" "root" | cryptsetup --batch-mode --verify-passphrase luksFormat /dev/disk/by-partlabel/SYS
|
||||
printf "%s\n" "root" | cryptsetup open /dev/disk/by-partlabel/SYS rootfs
|
||||
|
||||
#Create filesystem
|
||||
### Create filesystem
|
||||
mkfs.fat -F32 -n efi /dev/disk/by-partlabel/EFI
|
||||
mkfs.btrfs -f --label root /dev/mapper/rootfs
|
||||
|
||||
#Create btrfs subvolumes
|
||||
### Create btrfs subvolumes
|
||||
mount -o $MOUNTOPTS /dev/mapper/rootfs /mnt
|
||||
cd /mnt
|
||||
btrfs subvolume create @
|
||||
@@ -34,14 +34,14 @@ btrfs subvolume create @var
|
||||
cd "$DIRNAME"
|
||||
umount /mnt
|
||||
|
||||
#Mount volumes
|
||||
### Mount volumes
|
||||
mount --mkdir -o $MOUNTOPTS,subvol=@ /dev/mapper/rootfs /mnt
|
||||
mount --mkdir -o $MOUNTOPTS,subvol=@root /dev/mapper/rootfs /mnt/root
|
||||
mount --mkdir -o $MOUNTOPTS,subvol=@home /dev/mapper/rootfs /mnt/home
|
||||
mount --mkdir -o $MOUNTOPTS,subvol=@var /dev/mapper/rootfs /mnt/var
|
||||
mount --mkdir /dev/disk/by-partlabel/EFI /mnt/boot
|
||||
|
||||
#Init pacman
|
||||
### Init pacman
|
||||
pacman-key --init
|
||||
pacman-key --populate
|
||||
pacman -Sy
|
||||
@@ -49,9 +49,9 @@ pacman -Sy
|
||||
sed -i "s|^#Color.*|Color|" /etc/pacman.conf
|
||||
sed -i "s|^#ParallelDownloads.*|ParallelDownloads = 10|" /etc/pacman.conf
|
||||
|
||||
#Install base
|
||||
### Install base
|
||||
pacstrap "$PACSTRAP_EXTRA_ARGS" -K /mnt \
|
||||
base \
|
||||
base \
|
||||
base-devel \
|
||||
linux \
|
||||
linux-firmware \
|
||||
@@ -63,10 +63,10 @@ pacstrap "$PACSTRAP_EXTRA_ARGS" -K /mnt \
|
||||
openssh \
|
||||
git
|
||||
|
||||
#Generate fstab
|
||||
### Generate fstab
|
||||
genfstab -U /mnt | sed "s/subvolid=[0-9]\{3\},//" > /mnt/etc/fstab
|
||||
|
||||
#Configure boot environnement
|
||||
### Configure boot environnement
|
||||
sed -i "/^HOOKS/s|block|block encrypt btrfs|" /mnt/etc/mkinitcpio.conf
|
||||
sed -i "s|^BINARIES.*|BINARIES=\(btrfs\)|" /mnt/etc/mkinitcpio.conf
|
||||
|
||||
@@ -82,33 +82,33 @@ arch-chroot /mnt mkinitcpio -P
|
||||
|
||||
efibootmgr --create --disk $DISK --part 1 --label "Arch Linux" --loader 'arch-linux.efi'
|
||||
|
||||
#Configure installation
|
||||
##Configure vi
|
||||
### Configure installation
|
||||
# Configure vi
|
||||
cd /mnt/bin
|
||||
ln -s nvim vi
|
||||
cd "$DIRNAME"
|
||||
|
||||
##Configure login
|
||||
# Configure login
|
||||
sed -i 's|^root:.*|root:$y$j9T$BPO20nCgFZ8NuDn6LZ6KU0$681FWXbptNoLEbIKmyRtivt1NCpfPugq0hgtI8lsjCC:19916::::::|' /mnt/etc/shadow
|
||||
printf "PermitRootLogin yes" > /mnt/etc/ssh/sshd_config.d/99-permitrootlogin.conf
|
||||
|
||||
##Configure network
|
||||
# Configure network
|
||||
cp network/00-wired.network /mnt/etc/systemd/network/0-wired.network
|
||||
cp network/resolved.conf /mnt/etc/systemd/resolved.conf
|
||||
cd /mnt/etc
|
||||
ln -sf ../run/systemd/resolve/stub-resolv.conf resolv.conf
|
||||
cd "$DIRNAME"
|
||||
|
||||
##Configure tty
|
||||
# Configure tty
|
||||
mkdir -p /mnt/etc/systemd/system/getty@tty1.service.d/
|
||||
cp tty/autologin.conf /mnt/etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
cp tty/bash.bashexports /mnt/etc/bash.bashexports
|
||||
cp tty/bash.bashaliases /mnt/etc/bash.bashaliases
|
||||
cp tty/bash.bashrc /mnt/etc/bash.bashrc
|
||||
cp tty/inputrc /mnt/etc/inputrc
|
||||
cp tty/issue /mnt/etc/issue
|
||||
cp links/tty/autologin.conf /mnt/etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
cp links/tty/bash.bashexports /mnt/etc/bash.bashexports
|
||||
cp links/tty/bash.bashaliases /mnt/etc/bash.bashaliases
|
||||
cp links/tty/bash.bashrc /mnt/etc/bash.bashrc
|
||||
cp links/tty/inputrc /mnt/etc/inputrc
|
||||
cp links/tty/issue /mnt/etc/issue
|
||||
|
||||
##Restart services
|
||||
# Enable services
|
||||
arch-chroot /mnt systemctl enable sshd.service systemd-networkd.service systemd-timesyncd.service systemd-resolved.service
|
||||
|
||||
echo "DONE !!!"
|
||||
echo "DONE !!! Dont forget to change passwords"
|
||||
|
||||
Reference in New Issue
Block a user