79 lines
2.0 KiB
Bash
Executable File
79 lines
2.0 KiB
Bash
Executable File
#! /bin/bash
|
|
|
|
# Variablen
|
|
|
|
function base_install ()
|
|
{
|
|
pacstrap -i /mnt base dosfstools base-devel zsh efibootmgr git dhcpcd linux linux-headers linux-firmware nano vim openssh usbutils which man-db man-pages grub os-prober mtools
|
|
|
|
genfstab -U -p /mnt >> /mnt/etc/fstab
|
|
arch-chroot /mnt
|
|
}
|
|
|
|
|
|
function bootloader ()
|
|
{
|
|
grub-install --target=x86_64-efi efi-directory=/boot/EFI --bootloader-id=grub_uefi --recheck
|
|
echo"creating GRUB configuration"
|
|
grub-mkconfig -o /boot/grub/grub.cfg
|
|
mkinitcpio -p linux
|
|
}
|
|
|
|
function post_install ()
|
|
{
|
|
echo "setting language"
|
|
sed -i 's/#de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/gI;s/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/gI' /etc/locale.gen
|
|
locale-gen
|
|
echo KEYMAP=de >/etc/vconsole.conf
|
|
|
|
timedatectl set-local-rtc 0
|
|
hwclock --systohc --utc
|
|
}
|
|
|
|
|
|
function User ()
|
|
{
|
|
echo "set root pw"
|
|
read pwroot
|
|
passwd $pwroot
|
|
echo "creating user zsh shell in wheel group"
|
|
echo "enter username"
|
|
read username
|
|
useradd -m -G wheel -s bin/zsh $username
|
|
passwd $username
|
|
}
|
|
|
|
sed -i 's/#Include = /etc/pacman.d/mirrorlist/Include = /etc/pacman.d/mirrorlist/gI' /etc/pacman.conf
|
|
|
|
|
|
### Paket installation
|
|
echo -e "Welches gerät willst du installieren \n1 für PC (AMD-Nvidia) \n2 für Notebook (intel-Nvidia-interl-graphic) \n3 für ohne packete"
|
|
read geraet
|
|
|
|
|
|
# if test space beetwen "[" and "variable" for correction use #damit if richtig funktioniert
|
|
if [ "$geraet" = "1" ]
|
|
then
|
|
echo OK
|
|
# curl --request GET --header "PRIVATE-TOKEN:NxYGn_x6on4Ps2Ruz9uo" https://gitlab.com/api/v4/projects/15150094/repository/files/lattedockrc/raw\?ref\=master -o
|
|
elif [ "$gereat" = "2" ]
|
|
then
|
|
echo test
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## download from single file from gitlab
|
|
|
|
|
|
|
|
|
|
## example
|
|
|
|
# curl --request GET --header 'PRIVATE-TOKEN: YOUR_PRIVATE_TOKEN' 'https://gitlab.example.com/api/v4/projects/PROJECT_ID/repository/files/FILE_NAME/raw?ref=BRANCH' --output FILE_NAME
|
|
|
|
# curl --request GET --header "PRIVATE-TOKEN:NxYGn_x6on4Ps2Ruz9uo" https://gitlab.com/api/v4/projects/15150094/repository/files/lattedockrc/raw\?ref\=master -o dotfiles
|