diff --git a/flavours/cpu.flavour/install.sh b/flavours/cpu.flavour/install.sh new file mode 100755 index 0000000..2fcec1e --- /dev/null +++ b/flavours/cpu.flavour/install.sh @@ -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 diff --git a/flavours/networkmanager.flavour/install.sh b/flavours/networkmanager.flavour/install.sh new file mode 100755 index 0000000..0b4fac2 --- /dev/null +++ b/flavours/networkmanager.flavour/install.sh @@ -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 diff --git a/flavours/sound.flavour/install.sh b/flavours/sound.flavour/install.sh new file mode 100755 index 0000000..a0ae694 --- /dev/null +++ b/flavours/sound.flavour/install.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "~> Installing pulseaudio alsa-utils ponymix" +pacstrap /mnt pulseaudio alsa-utils ponymix + +amf_return=0 diff --git a/flavours/ssh.flavour/install.sh b/flavours/ssh.flavour/install.sh new file mode 100755 index 0000000..93d6c7f --- /dev/null +++ b/flavours/ssh.flavour/install.sh @@ -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 diff --git a/flavours/swapfile.flavour/install.sh b/flavours/swapfile.flavour/install.sh new file mode 100755 index 0000000..0487778 --- /dev/null +++ b/flavours/swapfile.flavour/install.sh @@ -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 diff --git a/flavours/user.flavour/install.sh b/flavours/user.flavour/install.sh index 5e765d3..d645644 100755 --- a/flavours/user.flavour/install.sh +++ b/flavours/user.flavour/install.sh @@ -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 diff --git a/steps/30-formatting.step b/steps/30-formatting.step index f42ff21..8a08823 100755 --- a/steps/30-formatting.step +++ b/steps/30-formatting.step @@ -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" diff --git a/steps/50-configure.step b/steps/50-configure.step index 322ed98..c7375c8 100755 --- a/steps/50-configure.step +++ b/steps/50-configure.step @@ -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