#!/bin/bash source env.sh #locale sed -i "s/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" /etc/locale.gen && \ sed -i "s/#cs_CZ.UTF-8 UTF-8/cs_CZ.UTF-8 UTF-8/g" /etc/locale.gen && \ locale-gen && \ echo LANG=cs_CZ.UTF-8 > /etc/locale.conf && \ export LANG=cs_CZ.UTF-8 && \ #timezone ln -s /usr/share/zoneinfo/$TIMEZONE /etc/localtime && \ #hostname echo "hostname=$HOSTNAME" > /etc/conf.d/hostname && \ #mk sed -i "s/consolefont block/consolefont block encrypt lvm2 resume/g" /etc/mkinitcpio.conf && \ #key-gen and cryptoset dd if=/dev/random of=/crypto_keyfile.bin bs=512 count=8 iflag=fullblock && \ chmod 000 /crypto_keyfile.bin && \ sed -i "s/FILES=(/FILES=(\/crypto_keyfile.bin/g" /etc/mkinitcpio.conf && \ pacman -S lvm2 lvm2-openrc cryptsetup cryptsetup-openrc && \ cryptsetup luksAddKey $DISK\2 /crypto_keyfile.bin && \ mkinitcpio -p linux-hardened && \ #passset passwd && \ #bootloader pacman -Sy && \ pacman -S dosfstools freetype2 fuse2 gptfdisk libisoburn mtools os-prober grub efibootmgr && \ sed -i "s/quiet/quiet resume=UUID=`blkid -s UUID -o value /dev/lvmSystem/volSwap`/g" /etc/default/grub && \ sed -i "s/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"cryptdevice=UUID=`blkid -s UUID -o value $DISK\2`:lvm-system\"/g" /etc/default/grub && \ sed -i "s/#GRUB_ENABLE_CRYPTODISK/GRUB_ENABLE_CRYPTODISK/g" /etc/default/grub && \ grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=artix --recheck $DISK && \ grub-mkconfig -o /boot/grub/grub.cfg && \ #services pacman -S haveged haveged-openrc && \ rc-update add haveged default && \ pacman -S cronie cronie-openrc && \ rc-update add cronie default && \ #user useradd -m -G wheel -s /bin/bash $USERNAME && \ passwd $USERNAME && \ sed -i "s/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g" /etc/sudoers #network pacman -S networkmanager networkmanager-openrc networkmanager-openvpn network-manager-applet && \ rc-update add NetworkManager default && \ #ssh pacman -S openssh openssh-openrc && \ rc-update add sshd default && \ #other deamons pacman -S ntp ntp-openrc acpid acpid-openrc syslog-ng syslog-ng-openrc && \ rc-update add ntpd default && \ rc-update add acpid default && \ rc-update add syslog-ng default && \ #Usefull utils pacman -S vi artools bash-completion lsof strace && \ yes a | pacman -S wget htop mc zip samba unrar p7zip unzip && \ yes a | pacman -S hdparm smartmontools hwinfo dmidecode && \ yes a | pacman -S whois rsync nmap tcpdump inetutils net-tools ndisc6