Compare commits

..

71 Commits

Author SHA1 Message Date
maride
c839b6bbf3 Add DejaVu font 2018-01-31 11:13:19 +01:00
maride
77dcbafc80 Add MATE as desktop environment 2018-01-30 23:32:50 +01:00
maride
d9879d3d55 Replace xcompmgr with compton 2018-01-09 17:16:51 +01:00
maride
5b2fe128ab Move dirmngr launch as it may produce some output 2017-11-02 13:13:58 +01:00
maride
6be3d2343e Fix typo. :( 2017-11-02 13:13:02 +01:00
maride
c1c37bbecf Add option to fetch keys via HTTP 80/tcp 2017-11-02 13:05:34 +01:00
maride
97e0f92e77 Add another bunch of unsplash tags 2017-10-17 10:48:40 +02:00
maride
140bb273d9 Fix Candy 2017-10-02 17:08:11 +02:00
maride
ba3a509403 Revert "Make GPG key fetching a bit faster"
This reverts commit 5841c57d71.
2017-10-01 17:44:48 +02:00
maride
ae6ca63711 Merge branch 'master' of https://git.darknebu.la/maride/arch-maride-flavour 2017-10-01 17:36:54 +02:00
maride
5841c57d71 Make GPG key fetching a bit faster 2017-10-01 17:36:43 +02:00
maride
b4281e8e74 Fixing UEFI check if-loop 2017-10-01 17:35:35 +02:00
maride
690bc54606 Pacman Magic thanks to Emile 2017-09-26 17:12:32 +02:00
maride
2e07d01843 Add NetworkManager flavour 2017-09-20 15:51:51 +02:00
maride
58d4f78a92 Actually, patch the right file 2017-09-20 15:51:03 +02:00
maride
c2d26a1f01 Add swap 2017-09-19 19:02:14 +02:00
maride
bc13ac0712 Add SSH as flavour 2017-09-19 13:49:02 +02:00
maride
039d2db196 Change shell (chsh) of user, not root 2017-09-13 15:40:15 +02:00
maride
5635e9efac Fix non-crypto install 2017-09-13 15:24:52 +02:00
maride
257067a67f Add amf_return line to cpu install.sh 2017-09-06 16:00:40 +02:00
maride
17741369fd Add 'sound' flavour 2017-09-06 16:00:15 +02:00
maride
6d105d17d2 Add CPU thermal/cpupower 2017-09-06 15:50:14 +02:00
maride
cb675e878e Add more themes/categories to unsplash flavour 2017-09-04 22:07:17 +02:00
maride
36b69a7e44 Change shell to zsh if asked for 2017-09-04 22:05:15 +02:00
maride
b832df461d Source checks, too 2017-09-04 21:33:05 +02:00
maride
8ccf3bf899 cd into the correct directory 2017-09-04 16:41:14 +02:00
maride
5e95159f18 Fix arch-chroot command 2017-09-04 16:39:53 +02:00
maride
b8b7673ac9 Move git install to install side, not ISO side 2017-09-04 16:20:12 +02:00
maride
198f62c1fc Yaourt flavour 2017-09-04 16:17:43 +02:00
maride
65b74e5279 Fix while conditions 2017-09-03 17:07:55 +02:00
maride
ec371ee383 Fix git-clone destionation for zsh 2017-09-03 16:56:26 +02:00
maride
c5bae37f33 Ask to re-run a failed step 2017-09-03 16:52:51 +02:00
maride
9b7374f768 Fix relative/chroot path 2017-09-03 01:46:37 +02:00
maride
f7980310dc Integrate ZSH to user flavour 2017-09-03 01:45:48 +02:00
maride
c52b6171ea Fix relative/chroot path 2017-09-03 01:37:21 +02:00
maride
af9eda2a85 Fix wallpaper paths 2017-09-03 01:35:07 +02:00
maride
3df47e621d Add german keyboard layout 2017-09-02 19:53:31 +02:00
maride
470cf15208 Add zsh.flavour 2017-09-02 19:47:58 +02:00
maride
8f054d1d2d Update unsplash.flavour to fulfill unsplashs updates 2017-09-02 18:11:26 +02:00
maride
2d3fbc04d6 Add more random wallpapers 2017-09-02 17:25:25 +02:00
maride
e61c0f7df8 Choose random wallpaper from /etc/wallpapers 2017-09-02 17:23:11 +02:00
maride
5c6d1322e0 Execute getent in chroot, not on ISO 2017-09-02 17:16:26 +02:00
maride
edda8ff56f Add user to sudo if requested 2017-09-02 16:55:17 +02:00
maride
f7b9089707 Make user creation a flavour, not a step. 2017-09-02 16:49:18 +02:00
maride
289f248c09 Fix GRUB/EFI install for Virtualbox hosts 2017-09-02 16:44:32 +02:00
maride
928df65190 Fix source command 2017-09-02 16:19:21 +02:00
maride
4c4b8b624c Add amf_return return code everywhere 2017-09-02 15:07:59 +02:00
maride
3fcf5a6a96 Update GPG/Pacman keys 2017-09-02 14:18:30 +02:00
maride
51af650e99 Move to 'source' and own return value variable 2017-08-31 16:27:55 +02:00
maride
ba1e4bff49 Add support for legacy BIOS boot 2017-08-12 16:01:00 +02:00
maride
955ec704e8 Fix capitalization 2017-08-10 22:17:53 +02:00
maride
66b6451532 Here we go again fixing execution permissions 2017-08-10 22:06:14 +02:00
maride
a3bd9823ee Add sudo flavour 2017-08-10 21:43:00 +02:00
maride
5d8275c9cf Trying to fix /home/user XS 2017-08-10 21:24:32 +02:00
maride
09e0574dba Yet again, fix execute permissions (+x) 2017-08-10 20:41:10 +02:00
maride
1c8fe0e0bc Add virtualbox-guest flavour 2017-08-10 18:50:14 +02:00
maride
9b0e2b66c4 Add xterm as terminal emulator 2017-08-10 18:45:43 +02:00
maride
501a8cd164 Add Unsplash as wallpaper source 2017-08-10 18:24:51 +02:00
maride
e2d707ad80 Fix .xinitrc install 2017-08-10 18:02:16 +02:00
maride
7737c3c652 Fix relative path error 2017-08-10 17:58:24 +02:00
maride
925741f12b Add root password change 2017-08-10 17:03:32 +02:00
maride
66affd78c0 Export username 2017-08-07 18:16:05 +02:00
maride
a5d2622f67 Add executable flag 2017-08-07 18:15:50 +02:00
maride
50aa19f459 Allow upper- and lowercase answers 2017-08-07 18:02:57 +02:00
maride
e5707bb776 Add wifi-menu flavour 2017-08-07 17:39:35 +02:00
maride
d79bd42091 Maybe call the correct scripts... 2017-08-07 17:38:39 +02:00
maride
5edbaf9f79 Add required suffix 2017-08-07 17:23:05 +02:00
maride
d27a676a8a Add flavours i3 and xorg; add choice for flavours; add reboot 2017-08-07 16:30:30 +02:00
maride
93273b4f7f Add changes from 'bootable' 2017-08-07 16:27:39 +02:00
maride
5c1282e94c Add popd line 2017-08-06 12:09:04 +02:00
maride
d08797d043 Add flavour loop 2017-08-06 12:07:46 +02:00
25 changed files with 295 additions and 48 deletions

View File

@ -4,9 +4,9 @@ ping -c 1 archlinux.org 2>/tmp/arch-maride-flavour_checks_internet_error.log 1>/
return=$? return=$?
if [ "$return" -eq 0 ]; then if [ "$return" -eq 0 ]; then
exit 0 amf_return=0
else else
echo "~> Either internet is unavailable or archlinux.org is down..." echo "~> Either internet is unavailable or archlinux.org is down..."
echo "~> (ping returned $return. Maybe check the logs in /tmp." echo "~> (ping returned $return. Maybe check the logs in /tmp."
exit 1 amf_return=1
fi fi

21
checks/packeys.check Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
amf_return=0
echo " We can force to fetch PGP keys via HTTP over 80/tcp."
echo " You probably don't want this unless your internet connection is heavily filtered."
echo -n "=> Is your internet connection filtered (e.g. company network)? (y/N)"
read answer
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo " Ugh. Poor bastard, you."
keyserver="hkp://p80.pool.sks-keyservers.net:80"
else
keyserver="hkp://pool.sks-keyservers.net"
fi
echo " Fetching via $keyserver"
dirmngr &
pacman-key --populate --keyserver $keyserver || amf_return=1
pacman-key --refresh-keys --keyserver $keyserver || amf_return=1

View File

@ -1,11 +1,16 @@
#!/bin/sh #!/bin/sh
if [ "$bootloader" == "BIOS" ]; then
echo "~> Not an EFI host, not checking for EFI."
amf_return=0
else
ls /sys/firmware/efi/efivars 2>/tmp/arch-maride-flavour_checks_uefi_error.log 1>/tmp/arch-maride-flavour_checks_uefi_out.log ls /sys/firmware/efi/efivars 2>/tmp/arch-maride-flavour_checks_uefi_error.log 1>/tmp/arch-maride-flavour_checks_uefi_out.log
return=$? return=$?
if [ "$return" -eq 0 ]; then if [ "$return" -eq 0 ]; then
exit 0 amf_return=0
else else
echo "~> This doesn't seem to be an UEFI boot. Please boot UEFI." echo "~> This doesn't seem to be an UEFI boot. Please boot UEFI."
exit 1 amf_return=1
fi
fi fi

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

18
flavours/i3.flavour/install.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
echo "~> Installing i3"
pacstrap /mnt i3 feh compton dmenu acpi
user=$(ls /mnt/home)
if [ "$user" == "" ]; then
path="/mnt/etc/skel/"
else
path="/mnt/home/$user/"
fi
echo "~> Creating .xinitrc"
echo "compton -CGb" > $path/.xinitrc
echo "feh --bg-fill /etc/wallpapers/\$(ls /etc/wallpapers/ | shuf -n 1)" >> $path/.xinitrc
echo "exec i3" >> $path/.xinitrc
amf_return=0

View File

@ -0,0 +1,16 @@
#!/bin/sh
echo "~> Installing mate"
pacstrap /mnt mate mate-extra
user=$(ls /mnt/home)
if [ "$user" == "" ]; then
path="/mnt/etc/skel/"
else
path="/mnt/home/$user/"
fi
echo "~> Creating .xinitrc"
echo "exec mate-session" > $path/.xinitrc
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 "~> Install sudo package"
pacstrap /mnt sudo
echo "~> Create group sudo and patch sudoers file"
arch-chroot /mnt groupadd sudo
arch-chroot /mnt sed -i "s/^# %sudo/%sudo/g" /etc/sudoers
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

@ -0,0 +1,11 @@
#!/bin/sh
echo "~> Grabbing a random image from unsplash.com..."
mkdir -p /mnt/etc/wallpapers/
for tag in {forest,ocean,sky,snow,architecture,technology,stars,hills,nature,fields,trees,night}; do
wget $(curl https://unsplash.com/search/photos/$tag | grep -oE 'content="http://images.unsplash.com/photo-([a-zA-Z0-9_\\-]*)' | sed -e 's/content="//g' | shuf -n 1) -O /mnt/etc/wallpapers/$tag-$(uuidgen).jpg
done
amf_return=0

View File

@ -0,0 +1,37 @@
#!/bin/sh
echo "~> Changing password for root account."
arch-chroot /mnt passwd root
echo -n "~> Do you want to create an user account? (Y/n) "
read answer
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
amf_return=0
else
echo -n " Name of your new user? "
read name
export username=$name
arch-chroot /mnt useradd -m $name
arch-chroot /mnt passwd $name
# If group "sudo" exists (=> sudo.flavour was installed), ask if the user should be added
if [ $(arch-chroot /mnt getent group sudo) ]; then
echo -n "~> Do you want to add $name to sudoers? (Y/n) "
read answer
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
arch-chroot /mnt usermod -a -G sudo $name
fi
fi
echo -n " Set up zsh with ohmyzsh for $name? (Y/n) "
read answer
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
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 $name
fi
amf_return=0
fi

View File

@ -0,0 +1,6 @@
#!/bin/sh
echo "~> Installing packages to be a virtualbox guest"
pacstrap /mnt virtualbox-guest-utils virtualbox-guest-modules-arch
amf_return=0

View File

@ -0,0 +1,5 @@
#!/bin/sh
pacstrap /mnt dialog wpa_supplicant
amf_return=0

View File

@ -0,0 +1,5 @@
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "de"
EndSection

View File

@ -0,0 +1,7 @@
#!/bin/sh
pacstrap /mnt xorg xorg-xinit xterm ttf-dejavu
cp 00-keyboard.conf /mnt/etc/X11/xorg.conf.d/
amf_return=0

View File

@ -0,0 +1,8 @@
#!/bin/sh
pacstrap /mnt git
arch-chroot /mnt git clone https://aur.archlinux.org/package-query.git /tmp/package-query && cd /tmp/package-query && makepkg -si
arch-chroot /mnt git clone https://aur.archlinux.org/yaourt.git /tmp/yaourt && cd /tmp/yaourt && makepkg -si
arch-chroot /mnt rm -R /tmp/package-query /tmp/yaourt
amf_return=0

View File

@ -11,11 +11,20 @@ echo " * An internet connection (DHCP or static, idc...)"
echo -n "=> Did you set that up? (y/N) " echo -n "=> Did you set that up? (y/N) "
read answer read answer
if [ "$answer" != "y" ]; then if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "OK, then do necessary steps and see you soon." echo "OK, then do necessary steps and see you soon."
exit 1 exit 1
fi fi
echo -n "=> Do you want to install on EFI or BIOS? BIOS is required for VirtalBox hosts (E/b) "
read answer
if [ "$answer" != "e" ] && [ "$answer" != "E" ]; then
export bootloader="BIOS";
else
export bootloader="EFI";
fi
echo "=> Please enter the full path to the block device the installation should take place on: (e.g. /dev/sda)" echo "=> Please enter the full path to the block device the installation should take place on: (e.g. /dev/sda)"
echo " Make sure to choose a drive, not a partition." echo " Make sure to choose a drive, not a partition."
echo " Hint: here's a list of devices that may be the right:" echo " Hint: here's a list of devices that may be the right:"
@ -27,9 +36,8 @@ export blockdevice
for check in checks/*.check for check in checks/*.check
do do
echo "=> Running check '$check'..." echo "=> Running check '$check'..."
$check source $check
return=$? if [ "$amf_return" -ne 0 ]; then
if [ "$return" -ne 0 ]; then
echo "=> Check failed. Fix it, maybe." echo "=> Check failed. Fix it, maybe."
exit exit
fi fi
@ -38,10 +46,45 @@ done
for step in steps/*.step for step in steps/*.step
do do
echo "=> Running step '$step'..." echo "=> Running step '$step'..."
$step source $step
return=$? if [ "$amf_return" -ne 0 ]; then
if [ "$return" -ne 0 ]; then
echo "=> Step failed. That is weird. Sorry. Check logs maybe." echo "=> Step failed. That is weird. Sorry. Check logs maybe."
exit exit
fi fi
done done
for flavour in flavours/*.flavour
do
# in any case, run it once
rerun=1
while [ $rerun -eq 1 ]; do
echo -n "=> Do you want to run flavour '$flavour'? (y/N) "
read answer
rerun=0;
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo "=> Running flavour '$flavour'..."
pushd $flavour
source ./install.sh
if [ "$amf_return" -ne 0 ]; then
echo "=> Flavour failed. :( Rerun? (Y/n) "
read answer
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
rerun=1;
fi
fi
popd
fi
done
done
echo -n "=> Finished \o/ reboot now? (Y/n) "
read answer
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
exit
fi
reboot

View File

@ -4,17 +4,17 @@ echo "~> Going to wipe $blockdevice. Just skip it if you are really sure that th
echo -n "~> Wipe block device? (Y/n) " echo -n "~> Wipe block device? (Y/n) "
read answer read answer
if [ "$answer" == "n" ]; then if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
exit 0 amf_return=0
fi else
echo -n "~> You sure? (y/N) " echo -n "~> You sure? (y/N) "
read answer read answer
if [ "$answer" == "y" ]; then if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo "~> OK. Be patient now, that could take some time..." echo "~> OK. Be patient now, that could take some time..."
dd if=/dev/zero of=$blockdevice status=progress dd if=/dev/zero of=$blockdevice status=progress
exit 0 amf_return=0
else else
exit 1 amf_return=1
fi
fi fi

View File

@ -8,8 +8,8 @@ echo -e "g\nn\n1\n2048\n+300M\nn\n2\n\n\np\nw" | fdisk $blockdevice
if [ "$?" -eq 0 ]; then if [ "$?" -eq 0 ]; then
echo "~> Seems to have worked. Yay!" echo "~> Seems to have worked. Yay!"
exit 0 amf_return=0
else else
echo "~> Failed. :(" echo "~> Failed. :("
exit 1 amf_return=1
fi fi

View File

@ -6,9 +6,10 @@ mkfs.fat -F32 ${blockdevice}1
echo -n "~> Do you want to encrypt root? (Y/n) " echo -n "~> Do you want to encrypt root? (Y/n) "
read answer read answer
if [ "$answer" == "n" ]; then if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
echo "~> There are close to no reasons to not do this, but hey, you're an adult." echo "~> There are close to no reasons to not do this, but hey, you're an adult."
rootformat=${blockdevice}2 rootformat=${blockdevice}2
didCrypt=0
else else
echo "~> Formatting root (/) for crypto" echo "~> Formatting root (/) for crypto"
cryptsetup -v luksFormat ${blockdevice}2 cryptsetup -v luksFormat ${blockdevice}2
@ -17,6 +18,7 @@ else
echo "~> Open the crypt container" echo "~> Open the crypt container"
cryptsetup luksOpen ${blockdevice}2 cryptroot cryptsetup luksOpen ${blockdevice}2 cryptroot
rootformat=/dev/mapper/cryptroot rootformat=/dev/mapper/cryptroot
didCrypt=1
fi fi
echo "~> Formatting $rootformat EXT4" echo "~> Formatting $rootformat EXT4"
@ -26,3 +28,5 @@ echo "~> Mount partitions"
mount $rootformat /mnt mount $rootformat /mnt
mkdir -p /mnt/boot mkdir -p /mnt/boot
mount ${blockdevice}1 /mnt/boot mount ${blockdevice}1 /mnt/boot
amf_return=0

View File

@ -2,3 +2,5 @@
echo "~> Installing 'base' group and 'grub', 'efibootmgr'" echo "~> Installing 'base' group and 'grub', 'efibootmgr'"
pacstrap /mnt base grub efibootmgr pacstrap /mnt base grub efibootmgr
amf_return=0

View File

@ -17,9 +17,19 @@ echo -e "~> Choose a hostname: "
read hostname read hostname
echo $hostname > /mnt/etc/hostname echo $hostname > /mnt/etc/hostname
echo "~> Configuring 'grub'" echo "~> Configuring 'grub' for $bootloader"
arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch_GRUB if [ "$bootloader" == "EFI" ]; then
arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=BOOT
# thanks to Virtualbox, this step is necessary
cp /mnt/boot/EFI/BOOT/{grubx64.efi,BOOTX64.EFI}
else
arch-chroot /mnt grub-install --target=i386-pc /dev/*da
fi
if [ "$didCrypt" -eq 1 ]; then
echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub 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 arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
echo "~> Patching mkinitcpio.conf for encryption magic" echo "~> Patching mkinitcpio.conf for encryption magic"
@ -28,3 +38,8 @@ echo "HOOKS=\"base udev autodetect modconf block keyboard keymap encrypt filesys
echo "~> ... and recompile the kernel" echo "~> ... and recompile the kernel"
arch-chroot /mnt mkinitcpio -p linux arch-chroot /mnt mkinitcpio -p linux
echo "~> Patching pacman.conf for some pacman magic."
arch-chroot /mnt sed -i "s/\[options\]/\[options\]\nILoveCandy/g" /etc/pacman.conf
amf_return=0

View File

@ -1,14 +0,0 @@
#!/bin/sh
echo -n "~> Do you want to create an user account? (Y/n) "
read answer
if [ "$answer" == "n" ]; then
exit 0
else
echo -n " Name of your new user? "
read name
arch-chroot /mnt useradd -m $name
arch-chroot /mnt passwd $name
exit 0
fi