This commit is contained in:
maride 2017-10-01 17:36:54 +02:00
commit ae6ca63711
8 changed files with 58 additions and 2 deletions

10
flavours/cpu.flavour/install.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
echo "~> Installing thermald cpupower"
pacstrap /mnt thermald cpupower
echo " Setting 'ondemand' governor"
arch-chroot /mnt cpupower frequency-set -g ondemand
echo " Start cpupower on boot"
arch-chroot /mnt systemctl enable cpupower
amf_return=0

View File

@ -0,0 +1,8 @@
#!/bin/sh
echo "~> Installing NetworkManager"
pacstrap /mnt networkmanager
echo " Enabling NetworkManager on boot"
arch-chroot /mnt systemctl enable NetworkManager
amf_return=0

View File

@ -0,0 +1,6 @@
#!/bin/sh
echo "~> Installing pulseaudio alsa-utils ponymix"
pacstrap /mnt pulseaudio alsa-utils ponymix
amf_return=0

14
flavours/ssh.flavour/install.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
echo "~> Install openssh package"
pacstrap /mnt openssh
echo "~> Patch /etc/ssh/sshd_config...:"
echo " * disallow passwords."
arch-chroot /mnt sed -i "s/^#PasswordAuthentication .*$/PasswordAuthentication no/g" /etc/ssh/sshd_config
echo " * force SSH keys."
arch-chroot /mnt sed -i "s/^#PubkeyAuthentication .*$/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
echo " * enable on boot."
arch-chroot /mnt systemctl enable sshd
amf_return=0

View File

@ -0,0 +1,10 @@
#!/bin/sh
echo "~> Installing systemd-swap"
pacstrap /mnt systemd-swap
echo " Patching swap.conf"
arch-chroot /mnt sed -i "s/\$swapfu_enabled=0/swapfu_enabled=1/g" /etc/systemd/swap.conf
echo " Enabling systemd-swap on boot"
arch-chroot /mnt systemctl enable systemd-swap
amf_return=0

View File

@ -30,7 +30,7 @@ else
pacstrap /mnt zsh git
arch-chroot /mnt git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git /home/$name/.oh-my-zsh
wget https://git.darknebu.la/maride/config/raw/master/zshrc -O /mnt/home/$name/.zshrc
arch-chroot /mnt chsh -s /bin/zsh
arch-chroot /mnt chsh -s /bin/zsh $name
fi
amf_return=0

View File

@ -9,6 +9,7 @@ read answer
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
echo "~> There are close to no reasons to not do this, but hey, you're an adult."
rootformat=${blockdevice}2
didCrypt=0
else
echo "~> Formatting root (/) for crypto"
cryptsetup -v luksFormat ${blockdevice}2
@ -17,6 +18,7 @@ else
echo "~> Open the crypt container"
cryptsetup luksOpen ${blockdevice}2 cryptroot
rootformat=/dev/mapper/cryptroot
didCrypt=1
fi
echo "~> Formatting $rootformat EXT4"

View File

@ -26,7 +26,10 @@ else
arch-chroot /mnt grub-install --target=i386-pc /dev/*da
fi
echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub
if [ "$didCrypt" -eq 1 ]; then
echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub
fi
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
echo "~> Patching mkinitcpio.conf for encryption magic"
@ -36,4 +39,7 @@ echo "HOOKS=\"base udev autodetect modconf block keyboard keymap encrypt filesys
echo "~> ... and recompile the kernel"
arch-chroot /mnt mkinitcpio -p linux
echo "~> Patching pacman.conf for some pacman magic."
echo "ILoveCandy" >> /mnt/etc/pacman.conf
amf_return=0