Compare commits

...

18 Commits

  1. 228
      bin/artixstrap
  2. 43
      bin/artixstrap-install
  3. 100
      etc/progs-base
  4. 17
      etc/progs-dev
  5. 3
      etc/progs-platform
  6. 134
      etc/progs.csv
  7. 97
      lib/artixstrap-common
  8. 4
      share/progs-amd
  9. 4
      share/progs-intel
  10. 3
      share/progs-nvidia

@ -1,86 +1,192 @@
#!/bin/bash
#!/bin/bash -e
BASEDIR=$(dirname "$0")
trap 'cleaner $? $LINENO' EXIT
# shellcheck source=../lib/artixstrap-common
source ../lib/artixstrap-common
source "$BASEDIR/"../lib/artixstrap-common
argparse "$@"
# TODO: wifi on/off
# TODO: lvm2 - basestrap, grub, mkinitcpio hook
# HOOKS=(base udev autodetect modconf block lvm2 filesystems keyboard resume fsck)
cleaner() {
[ "$1" != "0" ] && {
# error handling goes here
echo "Error $1 occurred on $2"
}
umount -R "$MOUNT" || true
}
INITPACKS=
case "$INIT" in
'openrc') INITPACKS='openrc elogind-openrc' ;;
'runit') INITPACKS='runit elogind-runit' ;;
's6') INITPACKS='s6 elogind-s6' ;;
'openrc') INITPACKS='elogind-openrc' ;;
'runit') INITPACKS='elogind-runit' ;;
'dinit') INITPACKS='elogind-dinit' ;;
's6') INITPACKS='elogind-s6' ;;
'66') INITPACKS='elogind-suite66' ;;
*) exit 1 ;;
esac
enable() {
service=$1
case "$INIT" in
'openrc') rc-update add "$service" ;;
'runit') ln -s /etc/runit/sv/"$service" /etc/runit/runsvdir/default ;;
's6') s6-rc-bundle -c /etc/s6/rc/compiled add default "$service" ;;
*) exit 2 ;;
esac
prepare() {
# TODO partition
# TODO mkfs
mount --source "$DEVICE" --target "$MOUNT"
[ "$DEBUG" -gt 0 ] && {
mkdir -p "$MOUNT/var/cache/pacman/"
mount --bind /var/cache/pacman/ "$MOUNT/var/cache/pacman/"
}
[ -n "$EFI" ] && [ -n "$MOUNT" ] && {
mkdir -p "$MOUNT/$EFIDIR"
mount --source "$EFI" --target "$MOUNT/$EFIDIR"
}
}
# install base system
# --------------------
basestrap "$MOUNT" base base-devel "$INITPACKS"
# install kernel
basestrap "$MOUNT" "$KERNEL" linux-firmware
basestrap "$MOUNT" vim wget curl git
# generate fstab
fstabgen -U "$MOUNT" >> "$MOUNT/etc/fstab"
# initial setup in chroot
artools-chroot "$MOUNT" ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
artools-chroot "$MOUNT" hwclock --systohc
artools-chroot "$MOUNT" sed -ri -e 's/^#en_US.UTF-8.*/en_US.UTF-8 UTF-8/' /etc/locale.gen
artools-chroot "$MOUNT" locale-gen
cat > "$MOUNT/etc/locale.conf" << EOF
stage1() {
# install base system
# --------------------
basestrap "$MOUNT" base base-devel "$INITPACKS"
# install kernel
if [ -n "$UCODE" ]
then
basestrap "$MOUNT" "$KERNEL" linux-firmware "$UCODE-ucode"
else
basestrap "$MOUNT" "$KERNEL" linux-firmware
fi
basestrap "$MOUNT" vim wget curl git
artix-chroot "$MOUNT" pacman-key --init
artix-chroot "$MOUNT" pacman-key --populate artix
# generate fstab
fstabgen -U "$MOUNT" >> "$MOUNT/etc/fstab"
# initial setup in chroot
artix-chroot "$MOUNT" ln -sf "$TZP" /etc/localtime
artix-chroot "$MOUNT" hwclock --systohc
artix-chroot "$MOUNT" sed -ri -e 's/^#en_US.UTF-8.*/en_US.UTF-8 UTF-8/' /etc/locale.gen
artix-chroot "$MOUNT" locale-gen
cat > "$MOUNT/etc/locale.conf" << EOF
export LANG="en_US.UTF-8"
export LC_COLLATE="C"
EOF
# bootloader
basestrap "$MOUNT" grub os-prober
artools-chroot "$MOUNT" grub-install --recheck "$DEVICE"
artools-chroot "$MOUNT" grub-mkconfig -o /boot/grub/grub.cfg
echo "$HOSTNAME" > "$MOUNT/etc/hostname"
cat > "$MOUNT/etc/hosts" << EOF
127.0.0.1 localhost
::1 localhost
127.0.1.1 $HOSTNAME.localdomain $HOSTNAME
EOF
# passwords and users
artools-chroot "$MOUNT" passwd
artools-chroot "$MOUNT" useradd -m \
-G video,audio,input,power,storage,lp,scanner,dbus,uucp -s /bin/bash "$USERNAME"
echo "Set user password:"
artools-chroot "$MOUNT" passwd "$USERNAME"
}
# network
basestrap "$MOUNT" dhcpcd "networkmanager-$INIT" network-manager-applet
basestrap "$MOUNT" openssh "openssh-$INIT"
stage2() {
# TODO: lvm2 - basestrap, grub, mkinitcpio hook
# HOOKS=(base udev autodetect modconf block lvm2 filesystems keyboard resume fsck)
# bootloader
basestrap "$MOUNT" grub os-prober
if [ -n "$EFI" ]
then
basestrap "$MOUNT" efibootmgr
artix-chroot "$MOUNT" grub-install --target=x86_64-efi --efi-directory="$EFIDIR" --recheck "$DEV_ROOT"
else
artix-chroot "$MOUNT" grub-install --recheck "$DEV_ROOT"
fi
artix-chroot "$MOUNT" grub-mkconfig -o /boot/grub/grub.cfg
# passwords and users
echo "Set root password:"
artix-chroot "$MOUNT" passwd
artix-chroot "$MOUNT" useradd -m \
-G video,audio,input,power,storage,lp,scanner,dbus,uucp -s /bin/bash "$USERNAME"
echo "Set user password:"
artix-chroot "$MOUNT" passwd "$USERNAME"
# network
if [ $NM -gt 0 ]
then
basestrap "$MOUNT" "networkmanager-$INIT" "network-manager-applet"
enable NetworkManager
else
basestrap "$MOUNT" "dhcpcd-$INIT"
enable dhcpcd
fi
basestrap "$MOUNT" "openssh-$INIT"
basestrap "$MOUNT" "syslog-ng-$INIT"
artix-chroot "$MOUNT" sed -ri -e 's/^#Port 22*/Port 2222/' \
/etc/ssh/sshd_config
enable sshd
}
pacman_conf() {
artix-chroot "$MOUNT" sed -ri -e 's/^#Color/Color\nILoveCandy/' \
/etc/pacman.conf
cp /etc/pacman.d/mirrorlist "$MOUNT/etc/pacman.d/"
[ "$ARCH" -gt 0 ] && {
basestrap "$MOUNT" artix-archlinux-support
artix-chroot "$MOUNT" pacman-key --populate archlinux
[ -f /etc/pacman.d/mirrorlist-arch ] && \
cp /etc/pacman.d/mirrorlist-arch "$MOUNT/etc/pacman.d/"
cat >> "$MOUNT/etc/pacman.conf" << EOF
##########
## ARCH ##
##########
[extra]
Include = /etc/pacman.d/mirrorlist-arch
[community]
Include = /etc/pacman.d/mirrorlist-arch
EOF
}
[ "$INSTANT" -gt 0 ] && {
if [ -f /etc/pacman.d/instantmirrorlist ]
then
cp /etc/pacman.d/instantmirrorlist "$MOUNT/etc/pacman.d/"
else
curl -sSL \
-O "$MOUNT/etc/pacman.d/instantmirrorlist" \
https://raw.githubusercontent.com/instantOS/instantOS/main/mirrors/amd64
fi
cat >> "$MOUNT/etc/pacman.conf" << EOF
##########
## InstantOS ##
##########
[instant]
SigLevel = Optional TrustAll
Include = /etc/pacman.d/instantmirrorlist
EOF
}
}
stage3() {
echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" > "$MOUNT/etc/sudoers.d/$USERNAME"
# install yay
artix-chroot "$MOUNT" sudo -u $USERNAME bash -c "
cd
wget -O yay.tgz https://aur.archlinux.org/cgit/aur.git/snapshot/yay-bin.tar.gz
tar xf yay.tgz
cd yay-bin
makepkg -si --noconfirm --needed"
# install yay
pushd /tmp || exit
wget -O yay.tgz https://aur.archlinux.org/cgit/aur.git/snapshot/yay-bin.tar.gz
tar xf yay.tgz
cd yay-bin || exit
chown -R "$USERNAME" .
su "$USERNAME" makepkg
cp yay-bin-*.pkg.tar.xz "$MOUNT/"
popd || exit
pacman_conf
mkdir -p "$MOUNT/install"
cp -ap "$BASEDIR/artixstrap-install" "$MOUNT/install/"
cp -r "$BASEDIR/../etc" "$MOUNT/install/progs/"
echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" > "$MOUNT/etc/sudoers.d/$USERNAME"
cp /etc/pacman.conf "$MOUNT/etc/pacman.conf"
cp /etc/pacman.d/mirrorlist{,-arch} "$MOUNT/etc/pacman.d/"
artix-chroot "$MOUNT" '/install/artixstrap-install'
rm -rf "$MOUNT/install"
./artixstrap-install
# code --install-extension Shan.code-settings-sync
}
# code --install-extension Shan.code-settings-sync
[ "$STAGE" -ge 0 ] && {
prepare
sanity
}
[ "$STAGE" -ge 1 ] && stage1
[ "$STAGE" -ge 2 ] && stage2
[ "$STAGE" -ge 3 ] && stage3
## END
echo 'Done.'

@ -1,33 +1,28 @@
#!/bin/bash
# shellcheck source=../lib/artixstrap-common
source ../lib/artixstrap-common
BASEDIR=$(dirname "$0")
PDIR="$BASEDIR/progs"
sanity
do_install() { \
do_install() {
# dialog --title "AAS Installation" --infobox "Installing \`$1\` ($n of $total). $1 $2" 5 70
artools-chroot "$MOUNT" sudo -u "$USERNAME" yay -S --noconfirm "$1" 2>&1
sudo -u "$USERNAME" yay -S --noconfirm --needed "$1" 2>&1
}
installationloop() { \
artools-chroot "$MOUNT" sudo -u "$USERNAME" yay -Syy --noconfirm 2>&1
PROGS="/tmp/progs.csv"
# ([ -f "$progsfile" ] && sed -r -e "s/@@VIDEO@@/$VIDEO/" "$progsfile" > /tmp/progs.csv) || curl -Ls "$progsfile" | sed '/^#/d' > /tmp/progs.csv
[ -f "$PROGS" ] && sed -r -e '/^#/d' -e "s/@@VIDEO@@/$VIDEO/" "$progsfile" > $PROGS
# total=$(wc -l < $PROGS)
# aurinstalled=$(pacman -Qm | awk '{print $1}')
while IFS=, read -r tag program comment; do
n=$((n+1))
echo "$comment" | grep "^\".*\"$" >/dev/null 2>&1 && \
comment="$(echo "$comment" | sed "s/\(^\"\|\"$\)//g")"
case "$tag" in
"") do_install "$program" "$comment" ;;
"A") do_install "$program" "$comment" ;;
# "G") gitmakeinstall "$program" "$comment" ;;
# "P") pipinstall "$program" "$comment" ;;
esac
done < $PROGS ;
installationloop() {
for progsfile in "$PDIR"/*
do
sed -r -e '/^#/d' -e "s/@@INIT@@/$INIT/" "$progsfile"
while IFS=, read -r tag program comment; do
echo "$comment" | grep "^\".*\"$" >/dev/null 2>&1 && \
comment="$(echo "$comment" | sed "s/\(^\"\|\"$\)//g")"
case "$tag" in
"") do_install "$program" "$comment" ;;
"A") do_install "$program" "$comment" ;;
# "G") gitmakeinstall "$program" "$comment" ;;
# "P") pipinstall "$program" "$comment" ;;
esac
done < "$progsfile" ;
done
}
installationloop

@ -0,0 +1,100 @@
TAG,NAME IN REPO (or git url),PURPOSE (should be a verb phrase to sound right while installing)
,i3-wm,"is the main graphical user interface and window manager."
,i3blocks,"is the status bar."
,ttf-inconsolata,"is the monospace font"
,ttf-linux-libertine,"provides the sans and serif fonts"
,ttf-ubuntu-font-family,"provides fonts"
,ttf-liberation,"provides fonts"
,otf-ipafont,"provides Japanese fonts"
A,nerd-fonts-ubuntu-mono,"provides the terminal font"
A,nerd-fonts-mononoki,"provides fonts"
A,nerd-fonts-monoid,"provides fonts"
A,ttf-ms-fonts,"provides fonts"
,ttf-dejavu,"provides fonts"
,cantarell-fonts,"provides fonts"
,arandr,"is a UI for screen adjustment."
,bat,"is cat(1) on steroids."
,libnotify,"allows desktop notifications."
,dunst,"is a suckless notification system."
,exfat-utils,"allows management of FAT drives."
,feh,"sets the wallpaper."
,ffmpeg,"can record and splice video and audio on the command line."
,gnome-keyring,"serves as the system keyring."
,artix-dark-theme,"gives the dark GTK theme used."
,sddm,"sddm"
,sddm-theme-artix,"sddm theme"
,alacritty,"is the terminal emulator"
,starship-bin,"is the fancy prompt"
,dmenu,""
,rofi-calc,""
,sshfs,""
,bash-completion,"is so you don't feel the need to switch to zsh"
,mpstat,"sysinfo (needed for cpu_usage block)"
,mc,""
,curl,""
,wget,""
,moc,""
,lvm2,""
,calibre,"eBook handler"
,mpv,"is the patrician's choice video player."
,smplayer,"is the patrician's choice video player."
A,freetube-bin,""
,evince,"is for PDFs"
,newsboat,"is a terminal RSS client."
,net-tools,""
,firefox-developer-edition,"browser"
A,brave-bin,"browser"
,ttf-joypixels,"is a package that gives the system unicode symbols and emojis used in the status bar and elsewhere."
A,ttf-symbola,"provides unicode and emoji symbols."
,alsa-utils,"is the audio system (>inb4 bloat)."
,imagemagick,"is a terminal image-manipulator providing some convenient shortcuts and the lockscreen."
,htop,"provides system usage information and displays processes."
A,gyazo,""
,screen,""
,inetutils,""
,tmux,""
,geany,""
,geany-plugins,""
A,geany-themes,""
,redshift,""
,strace,""
,rsync,""
,pigz,""
,pixz,""
,lbzip2,""
,unrar,""
,git,""
,pv,""
,libpng,""
,libpng12,""
,lm_sensors,""
,man-db,"for RTFM"
,socat,"is a socket utility."
,tmux,"is a terminal multiplexer and the dropdown window."
,unclutter,"hides an inactive mouse."
,unrar,"extracts rar's."
,p7zip,"unzips zips."
,xclip,"allows for copying and pasting from the command line."
,xdotool,"provides window action utilities on the command line."
,xorg-xdpyinfo,"aids with resolution determination and screen recording."
,xorg-xmodmap,"is for fudging with keycodes"
,xorg-xkill,"is for killing misbehaving windows"
A,xbanish,"hides cursor"
,yt-dlp,"can download any YouTube video (or playlist or channel) when given the link."
,zathura,"is a pdf viewer with vim-like bindings."
,zathura-djvu,"gives zathura the ability to read .djvu files."
,zathura-pdf-mupdf,"allows mupdf pdf compatibility in zathura."
,docx2txt,"enables .docx file previews in vifm."
,odt2txt,"enables .odt file previews in vifm."
,gvfs,""
,mosh,""
,keepassxc,""
,cpupower,"for setting processor clock speed"
,upower,"for battery block"
,sysstat,"if for some hw-related i3blocks"
,xkb-switch,"shows kb layout"
,android-udev,""
A,android-sdk-platform-tools,""
A,android-bash-completion,""

@ -0,0 +1,17 @@
#TAG,NAME IN REPO (or git url),PURPOSE (should be a verb phrase to sound right while installing)
,jdk11-graalvm-bin,"java"
,jq,"for JSON parsing"
,yq,"for YAML parsing"
,fzf,"is a fuzzy find tool"
# virt
,libvirt,""
,libvirt-@@INIT@@,""
,qemu,""
,nc,"for libvirt"
,ebtables,"for libvirt"
,dnsmasq,"for libvirt"
,bridge-utils,"for libvirt"
# editor
A,vscodium-bin,""
A,vscodium-bin-marketplace,""

@ -0,0 +1,3 @@
#TAG,NAME IN REPO (or git url),PURPOSE (should be a verb phrase to sound right while installing)
,@@VIDEO@@,"graphics driver"

@ -1,134 +0,0 @@
#TAG,NAME IN REPO (or git url),PURPOSE (should be a verb phrase to sound right while installing)
,@@VIDEO@@,"video driver."
#
,i3-wm,"is the main graphical user interface and window manager."
,i3blocks,"statusline for i3."
# ,xorg-xwininfo,"allows querying information about windows."
# ,sxhkd,"binds key."
,ttf-inconsolata,"is the monospace font"
,ttf-linux-libertine,"provides the sans and serif fonts"
,ttf-ubuntu-font-family,"provides fonts"
,ttf-liberation,"provides fonts"
,ttf-mononoki,"provides fonts"
,otf-ipafont,"provides Japanese fonts"
,nerd-fonts-mononoki,"provides fonts"
A,ttf-ms-fonts,"provides fonts"
,ttf-dejavu,"provides fonts"
,cantarell-fonts,"provides fonts"
#,vifm,"is an extensive terminal file manager that everyone likes."
#,tree,"lists directory contents like trees. Used by vifm."
,arandr,"is a UI for screen adjustment."
,bat,"is cat(1) on steroids."
#,bc,"is used for a dropdown calculator."
#,calcurse,"is a lightweight terminal-based calendar."
#,xcompmgr,"is for transparency and removing screen-tearing."
,xorg-xprop,"is a tool for detecting window properties."
,dosfstools,"allows your computer to access dos-like filesystems."
,libnotify,"allows desktop notifications."
,dunst,"is a suckless notification system."
,exfat-utils,"allows management of FAT drives."
,sxiv,"is a minimalist image viewer."
,viewnior,"image viewer."
,feh,"sets the wallpaper."
,ffmpeg,"can record and splice video and audio on the command line."
,gnome-keyring,"serves as the system keyring."
#A,gtk-theme-arc-gruvbox-git,"gives the dark GTK theme used."
,artix-dark-theme,"gives the dark GTK theme used."
,artix-grub-theme,"gives the grub theme used."
,sddm,"sddm"
,sddm-theme-artix,"sddm theme"
,neovim,"a tidier vim with some useful features"
,i3blocks,"is the status bar."
,i3lock,"is the screen lock."
#,mpd,"is a lightweight music daemon."
#,mpc,"is a terminal interface for mpd."
#,ncmpcpp,"a ncurses interface for music with multiple formats and a powerful tag editor."
,alacritty,""
,audacity,""
,dmenu,""
,mpstat,"sysinfo (needed for cpu_usage block)"
,mc,""
,moc,""
,lvm2,""
,calibre,"eBook handler"
,mpv,"is the patrician's choice video player."
,smplayer,"is the patrician's choice video player."
,vlc,"is the patrician's choice video player."
,newsboat,"is a terminal RSS client."
,net-tools,""
,firefox,"browser"
,thunderbird,"mail"
,firefox-developer-edition,"browser"
,chromium,"browser"
A,brave-bin,"browser"
,ttf-joypixels,"is a package that gives the system unicode symbols and emojis used in the status bar and elsewhere."
A,ttf-symbola,"provides unicode and emoji symbols."
,ntfs-3g,"allows accessing NTFS partitions."
,alsa-utils,"is the audio system (>inb4 bloat)."
,imagemagick,"is a terminal image-manipulator providing some convenient shortcuts and the lockscreen."
A,sc-im,"is an Excel-like terminal spreadsheet manager."
,htop,"provides system usage information and displays processes."
,maim,"can take quick screenshots at your request."
A,gyazo,""
A,android-sdk-platform-tools,""
,screen,""
,sshfs,""
,icedtea-web,""
,inetutils,""
,tmux,""
,steam,"Steam"
,geany,""
,geany-plugins,""
A,geany-themes,""
,redshift,""
,strace,""
,rsync,""
,pigz,""
,pixz,""
,lbzip2,""
,unrar,""
,git,""
,pv,""
,libpng,""
,libpng12,""
,lm_sensors,""
,socat,"is a socket utility."
,tmux,"is a terminal multiplexer and the dropdown window."
,unclutter,"hides an inactive mouse."
,unrar,"extracts rar's."
,p7zip,"unzips zips."
A,urlscan,"parses URLs in the terminal allowing keyboard-based selection."
#,xcape,"gives the special escape/super mappings."
,xclip,"allows for copying and pasting from the command line."
,xdotool,"provides window action utilities on the command line."
,xorg-xdpyinfo,"aids with resolution determination and screen recording."
,xorg-xmodmap,"for fudging with keycodes"
,xorg-xkill,"for fudging with keycodes"
,youtube-dl,"can download any YouTube video (or playlist or channel) when given the link."
,zathura,"is a pdf viewer with vim-like bindings."
,zathura-djvu,"gives zathura the ability to read .djvu files."
,zathura-pdf-mupdf,"allows mupdf pdf compatibility in zathura."
#A,python-ueberzug,"generates image previews in vifm and other terminal programs."
,poppler,"manipulates .pdfs and gives .pdf previews and other .pdf functions."
,mediainfo,"shows audio and video information and is used by vifm as well."
#,atool,"manages and gives information about archives."
,fzf,"is a fuzzy finder tool."
,highlight,"can highlight code output."
#,xorg-xbacklight,"enables changing screen brightness levels."
A,task-spooler,"queues commands or files for download."
A,simple-mtpfs,"enables the mounting of cell phones."
,docx2txt,"enables .docx file previews in vifm."
,odt2txt,"enables .odt file previews in vifm."
,gvfs,""
,mosh,""
,keepassxc,""
,cpupower,""
,sysstat,""
,vscodium-bin,""
,vscodium-bin-marketplace,""
#,waterfox,""
#,steam,""
#,lib32-openal lib32-nss lib32-gtk2 lib32-gtk3 lib32-libcanberra lib32-gconf lib32-dbus-glib lib32-libnm-glib lib32-libudev0-shim lib32-libvdpau lib32-libpulse lib32-libva,""
unable to load file from head commit

@ -1,44 +1,93 @@
#!/bin/bash
export DEVICE=/dev/sda
export DEBUG=1
export DEVICE=/dev/loop0p2
export DEV_ROOT=/dev/loop0
export EFI=/dev/loop0p1
export EFIDIR=/efi
export MOUNT=/mnt/newstrap
export INIT=runit
export USERNAME=aldum
export KERNEL=linux
export TIMEZONE=Europe/Budapest
export UCODE=
TIMEZONE=Europe/Budapest
export HOSTNAME=test
export NM=0
export ARCH=1
export INSTANT=1
export progsfile=progs.csv
export VIDEO=xf86-video-intel
export TZP="/usr/share/zoneinfo/$TIMEZONE"
sanity() {
[ -z "$MOUNT" ] && { echo 'Check settings' ; exit 1; }
# TODO: check if it is mounted, display drive info, ask for confirmation
ERR=0
[ ! -e "$DEVICE" ] && { echo 'Check settings: DEVICE'; ((ERR++)); }
[ ! -e "$DEV_ROOT" ] && { echo 'Check settings: DEVICE'; ((ERR++)); }
[ -n "$EFI" ] && [ ! -e "$EFI" ] && {
echo 'Either provide a valid EFI partition or use MBR mode'
((ERR++))
}
[ ! -d "$MOUNT" ] && { echo 'Check settings: MOUNT'; ((ERR++)); }
[ ! -f "$TZP" ] && { echo 'Check settings: TIMEZONE'; ((ERR++)); }
case "$INIT" in
'openrc'|'runit'|'dinit'|'s6'|'66') ;;
*) echo 'INIT not supported'; ((ERR++)) ;;
esac
[ -n "$UCODE" ] && {
case "$UCODE" in
'amd'|'intel') ;;
*) echo 'what kind of CPU do you have?'; ((ERR++)) ;;
esac
}
findmnt "$MOUNT" &> /dev/null || { echo 'Not mounted'; ((ERR++)); }
[ "$ERR" -gt 0 ] && {
exit 1
}
echo "Installing to $DEVICE at $MOUNT"
[ -n "$EFI" ] && echo "EFI mode" || echo "MBR mode"
echo "TZ: $TIMEZONE, init: $INIT, user: $USERNAME"
echo "kernel: $KERNEL, hostname will be $HOSTNAME"
[ $NM -gt 0 ] && echo "with Network Manager"
echo '---------------------------'
mount | grep "$MOUNT" | grep -v cache
echo "Proceed?"
read -r
}
# TODO: wifi on/off
# TODO: lvm2 - basestrap, grub, mkinitcpio hook
# HOOKS=(base udev autodetect modconf block lvm2 filesystems keyboard resume fsck)
enable() {
service=$1
[ -z "$1" ] && return
service="$1"
case "$INIT" in
'openrc') rc-update add "$service" ;;
'runit') ln -s /etc/runit/sv/"$service" /etc/runit/runsvdir/default;;
's6') s6-rc-bundle -c /etc/s6/rc/compiled add default "$service" ;;
'openrc')
artix-chroot "$MOUNT" rc-update add" $service" ;;
'runit')
artix-chroot "$MOUNT" \
ln -sf "/etc/runit/sv/$service" /etc/runit/runsvdir/default ;;
'dinit')
artix-chroot "$MOUNT" dinitctl enable "$service" ;;
's6')
artix-chroot "$MOUNT" \
s6-rc-bundle -c /etc/s6/rc/compiled add default "$service" ;;
'66')
artix-chroot "$MOUNT" 66-enable -t default "$service" ;;
*) exit 2 ;;
esac
}
manualinstall() { # Installs $1 manually if not installed. Used only for AUR helper here.
[ -f "/usr/bin/$1" ] || (
dialog --infobox "Installing \"$1\", an AUR helper..." 4 50
cd /tmp || exit
rm -rf /tmp/"$1"*
curl -sO https://aur.archlinux.org/cgit/aur.git/snapshot/"$1".tar.gz &&
sudo -u "$USERNAME" tar -xvf "$1".tar.gz >/dev/null 2>&1 &&
cd "$1" &&
sudo -u "$USERNAME" makepkg --noconfirm -si >/dev/null 2>&1
cd /tmp || return) ;
}
argparse() {
STAGE=-1
for i in "$@"
do
case $i in
-s=*|--stage=*)
STAGE="${i#*=}"
;;
*) # unknown option
;;
esac
done
export STAGE
}

@ -0,0 +1,4 @@
,mesa,""
,amdgpu,""
,amdvlk,"for vulkan support"

@ -0,0 +1,4 @@
,mesa,""
,intel-media-driver,"for video hw accel"
,vulkan-intel,"for vulkan support"

@ -0,0 +1,3 @@
,mesa,""
,nvidia-utils,"for vulkan support"
Loading…
Cancel
Save