From 6d105d17d27cdc38a623744e96bf96b30e6c834e Mon Sep 17 00:00:00 2001 From: maride Date: Wed, 6 Sep 2017 15:50:14 +0200 Subject: [PATCH 01/10] Add CPU thermal/cpupower --- flavours/cpu.flavour/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 flavours/cpu.flavour/install.sh diff --git a/flavours/cpu.flavour/install.sh b/flavours/cpu.flavour/install.sh new file mode 100755 index 0000000..eee0ec0 --- /dev/null +++ b/flavours/cpu.flavour/install.sh @@ -0,0 +1,8 @@ +#!/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 From 17741369fd30b0a6cc9ac56d99ac585aa863ddac Mon Sep 17 00:00:00 2001 From: maride Date: Wed, 6 Sep 2017 16:00:15 +0200 Subject: [PATCH 02/10] Add 'sound' flavour --- flavours/sound.flavour/install.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 flavours/sound.flavour/install.sh 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 From 257067a67fcf6f3b3b4fb0d295cee31241bc18d4 Mon Sep 17 00:00:00 2001 From: maride Date: Wed, 6 Sep 2017 16:00:40 +0200 Subject: [PATCH 03/10] Add amf_return line to cpu install.sh --- flavours/cpu.flavour/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flavours/cpu.flavour/install.sh b/flavours/cpu.flavour/install.sh index eee0ec0..2fcec1e 100755 --- a/flavours/cpu.flavour/install.sh +++ b/flavours/cpu.flavour/install.sh @@ -6,3 +6,5 @@ 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 From 5635e9efac7ae414c0522b07d9010bce90797db5 Mon Sep 17 00:00:00 2001 From: maride Date: Wed, 13 Sep 2017 15:24:52 +0200 Subject: [PATCH 04/10] Fix non-crypto install --- steps/30-formatting.step | 2 ++ steps/50-configure.step | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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..2529a97 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" From 039d2db196eff9070fa09438d30b830c61b39b2b Mon Sep 17 00:00:00 2001 From: maride Date: Wed, 13 Sep 2017 15:40:15 +0200 Subject: [PATCH 05/10] Change shell (chsh) of user, not root --- flavours/user.flavour/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From bc13ac0712a0218fdee3d44e8df42fd7633f1dbe Mon Sep 17 00:00:00 2001 From: maride Date: Tue, 19 Sep 2017 13:49:02 +0200 Subject: [PATCH 06/10] Add SSH as flavour --- flavours/ssh.flavour/install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 flavours/ssh.flavour/install.sh 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 From c2d26a1f01eea2d89fdaa71f6728caa0e0e36c92 Mon Sep 17 00:00:00 2001 From: maride Date: Tue, 19 Sep 2017 19:02:14 +0200 Subject: [PATCH 07/10] Add swap --- flavours/swapfile.flavour/install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 flavours/swapfile.flavour/install.sh diff --git a/flavours/swapfile.flavour/install.sh b/flavours/swapfile.flavour/install.sh new file mode 100755 index 0000000..adf82bf --- /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/systemctl/swap.conf +echo " Enabling systemd-swap on boot" +arch-chroot /mnt systemctl enable systemd-swap + +amf_return=0 From 58d4f78a923596d4f7e9acdf9b3fd2a7077fc4cf Mon Sep 17 00:00:00 2001 From: maride Date: Wed, 20 Sep 2017 15:51:03 +0200 Subject: [PATCH 08/10] Actually, patch the right file --- flavours/swapfile.flavour/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flavours/swapfile.flavour/install.sh b/flavours/swapfile.flavour/install.sh index adf82bf..0487778 100755 --- a/flavours/swapfile.flavour/install.sh +++ b/flavours/swapfile.flavour/install.sh @@ -3,7 +3,7 @@ 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/systemctl/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 From 2e07d018431f82e2c1c78e0742789e3ddc53f212 Mon Sep 17 00:00:00 2001 From: maride Date: Wed, 20 Sep 2017 15:51:51 +0200 Subject: [PATCH 09/10] Add NetworkManager flavour --- flavours/networkmanager.flavour/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 flavours/networkmanager.flavour/install.sh 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 From 690bc54606a92ba9135bfbcccbf80687bd2c09ea Mon Sep 17 00:00:00 2001 From: maride Date: Tue, 26 Sep 2017 17:12:32 +0200 Subject: [PATCH 10/10] Pacman Magic thanks to Emile --- steps/50-configure.step | 3 +++ 1 file changed, 3 insertions(+) diff --git a/steps/50-configure.step b/steps/50-configure.step index 2529a97..c7375c8 100755 --- a/steps/50-configure.step +++ b/steps/50-configure.step @@ -39,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