improved script

This commit is contained in:
λmolinae 2025-05-19 18:14:23 -06:00
parent e4cdb2fced
commit c67cb23497
3 changed files with 18 additions and 6 deletions

View file

@ -22,9 +22,11 @@ You need to have an Alpine Linux installation with at least one user. To run thi
wget https://git.amolinae.com/amolinae06/installer/raw/branch/main/installer.sh && doas sh installer.sh wget https://git.amolinae.com/amolinae06/installer/raw/branch/main/installer.sh && doas sh installer.sh
``` ```
It will prompt for a username, you'll need to input the user you want the dotfiles, chroot, and shell setup installed to. (e.g. amolinae, leon, etc.) It will prompt for a username, you'll need to input the user you want the dotfiles, chroot, and shell setup installed to (e.g. amolinae, leon, etc.).
The whole installation shouldn't take more than `6 minutes`. After it finishes it is time to make a few extra setup steps such as installing nvidia drivers or amd drivers. Aditionally, the software that requires to be compiled will be done after the post-install script gets called, this is because most of these require to be logged in as the user.
The whole installation shouldn't take more than `6 minutes`, in my case both installation attempts took around 4 to 5 minutes. After it finishes it is time to make a few extra setup steps such as installing nvidia drivers or amd drivers which should be mandatory if you have the hardware.
## TODO ## TODO
- [X] Read `software.csv` - [X] Read `software.csv`
@ -35,4 +37,6 @@ The whole installation shouldn't take more than `6 minutes`. After it finishes i
- [X] Compile git software on chroot. - [X] Compile git software on chroot.
- [ ] Cleanup files. - [ ] Cleanup files.
- [ ] Auto reboot. - [ ] Auto reboot.
- [ ] Error handling.
- [ ] Make the scripts look prettier. - [ ] Make the scripts look prettier.
- [ ] Add to my domain (amolinae.com) for easier retrieval.

View file

@ -4,6 +4,12 @@ dotfiles="https://git.amolinae.com/amolinae06/dotfiles.git"
software="https://git.amolinae.com/amolinae06/installer/raw/branch/main/software.csv" software="https://git.amolinae.com/amolinae06/installer/raw/branch/main/software.csv"
postinstall="https://git.amolinae.com/amolinae06/installer/raw/branch/main/postinstall.sh" postinstall="https://git.amolinae.com/amolinae06/installer/raw/branch/main/postinstall.sh"
update_alpine(){
printf "Updating alpine indexes.\n"
apk update && apk upgrade
printf "Updated successdully.\n"
}
apk_install(){ apk_install(){
echo "installing $1"; apk add "$1" >/dev/null 2>&1 echo "installing $1"; apk add "$1" >/dev/null 2>&1
} }
@ -46,7 +52,7 @@ setup_greetd(){
vt = 7 vt = 7
[default_session] [default_session]
command = "tuigreet -t -r --cmd /home/$user/.local/bin/dwllaunch" command = "agreety -t -r --cmd /home/$user/.local/bin/dwllaunch"
user = "greetd" user = "greetd"
EOF EOF
@ -88,6 +94,7 @@ setup_chroot(){
mkdir -p alpchroot/etc/apk mkdir -p alpchroot/etc/apk
cp /etc/apk/repositories alpchroot/etc/apk/repositories cp /etc/apk/repositories alpchroot/etc/apk/repositories
apk del curl apk del curl
rm -rf sbin/ .PKGINFO .SIGN.RSA.alpine-devel@lists.alpinelinux.org-6165ee59.rsa.pub apk-tools-static-2.14.4-r1.apk
printf "Finished setting up chroot!\n" printf "Finished setting up chroot!\n"
} }
@ -110,6 +117,7 @@ get_user(){
check_root check_root
echo "Welcome to the installer" echo "Welcome to the installer"
update_alpine
apk_install git apk_install git
get_user get_user
read_software "$software" read_software "$software"
@ -122,4 +130,4 @@ setup_shell
setup_bluetooth setup_bluetooth
setup_chroot setup_chroot
post_install "$user" post_install "$user"
printf "Installation finished, before you reboot please install packages you need (e.g nvidia/amd drivers) \n"; exit 0 printf "Installation finished, before you reboot please install packages you need (e.g nvidia/amd drivers)\n"; exit 0

View file

@ -12,7 +12,7 @@ fuzzel,"Application launcher for wlroots-based Wayland compositors",N,
git,"Distributed version control system",N, git,"Distributed version control system",N,
gnome-keyring,"GNOME keyring",N, gnome-keyring,"GNOME keyring",N,
greetd,"Minimal and flexible login manager daemon",N, greetd,"Minimal and flexible login manager daemon",N,
greetd-tuigreet,"Graphical console greeter for greetd",N, greetd-agreety,"Simple, text-based greeter",N,
grim,"Grabs images from Wayland compositors",N, grim,"Grabs images from Wayland compositors",N,
imv-wayland,"Image viewer for Wayland",N, imv-wayland,"Image viewer for Wayland",N,
kanshi,"Dynamic display configuration for Wayland",N, kanshi,"Dynamic display configuration for Wayland",N,

Can't render this file because it contains an unexpected character in line 8 and column 101.