forked from BodgeMaster/void-usb
Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
f1ee7c85dd | |
|
34d6e1674c | |
|
3f10d03ad5 | |
|
517ac34e3d | |
|
2cc32fe645 |
|
@ -0,0 +1,19 @@
|
|||
|
||||
### Configuration Scripts
|
||||
|
||||
Use this to Deploy rices/set up services/etc.
|
||||
|
||||
Each configuration script should follow this structure:
|
||||
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
# NAME: Your Script Name
|
||||
# DESC: A brief description of what the script does.
|
||||
|
||||
# Your script logic here
|
||||
```
|
||||
|
||||
If `# NAME:` is not found, install stage 2 will fall back to displaying the script's filename.
|
||||
If `# DESC:` is not found, "No description available." will be displayed instead.
|
||||
|
||||
Place the scripts under this folder, add the filename to `scripts.lst` (separate by newline) and they will show up in the installer.
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
# NAME: Install i3wm
|
||||
# DESC: This script installs i3wm and basic utilities.
|
||||
|
||||
echo "Updating Void"
|
||||
xbps-install -Suv
|
||||
xbps-install -S
|
||||
|
||||
|
||||
echo -e "Installing i3wm"
|
||||
|
||||
xbps-install -S xinit xorg base-devel i3 i3status i3-gaps termite
|
|
@ -0,0 +1 @@
|
|||
i3wm.sh
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
LOGFILE=/tmp/void-usb-install-log
|
||||
GIT_REPO_BASE="https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master"
|
||||
GIT_REPO_BASE="https://lostcave.ddnss.de/git/BodgeMaster/void-usb/raw/branch/master"
|
||||
|
||||
function press_any_key {
|
||||
echo "Press any key to continue or Ctrl+c to abort..."
|
||||
|
@ -62,7 +62,7 @@ fi
|
|||
|
||||
echo "
|
||||
This script will now download and install Void Linux on your USB stick.
|
||||
Any data that is currently on the stick will be lost and it won’t be
|
||||
Any data that is currently on the stick will be lost and it won't be
|
||||
usable from Windows or MacOS.
|
||||
|
||||
Before we begin, the following packages need to be installed (if not installed already):
|
||||
|
@ -78,9 +78,7 @@ echo -n "Installing xmirror, squashfs-tools, wget... "
|
|||
xbps-install --yes xmirror wget >> $LOGFILE 2>&1
|
||||
echo "done"
|
||||
|
||||
#TODO: If going down the path of extracting routines from void-installer, that should be done here
|
||||
|
||||
#TODO: Select keyboard layout
|
||||
#TODO: Select keyboard layout by showing lists of what's present (directories for region, then files within)
|
||||
KBD_LAYOUT="de-latin1"
|
||||
|
||||
clear
|
||||
|
@ -207,15 +205,32 @@ the chosen mirror from the config file it generates.
|
|||
"
|
||||
press_any_key
|
||||
xmirror
|
||||
#TODO: also remove CPU architecture
|
||||
TARGET_MIRROR="$(sed 's/repository=//;s|/musl$||' /etc/xbps.d/00-repository-main.conf)"
|
||||
|
||||
#TODO: select installation type
|
||||
TARGET_TYPE="x86_64"
|
||||
|
||||
#TODO: also add CPU architecture
|
||||
#TODO: allow only 32 bit on a 32 bit system
|
||||
options=("x86_64" "x86_64 musl" "x86_32")
|
||||
while true; do
|
||||
echo "Select your desired architecture."
|
||||
for i in "${!options[@]}"; do
|
||||
echo "$((i+1)): ${options[$i]}"
|
||||
done
|
||||
|
||||
read -p "Input your choice (number): " choice
|
||||
|
||||
if [ "$choice" -ge 1 ] && [ "$choice" -le "${#options[@]}" ]; then
|
||||
TARGET_TYPE="${options[$((choice-1))]}"
|
||||
break
|
||||
else
|
||||
echo "Selection invalid."
|
||||
fi
|
||||
done
|
||||
|
||||
echo "You selected: $TARGET_TYPE"
|
||||
|
||||
if grep "musl" <<< "$TARGET_TYPE"; then
|
||||
TARGET_MIRROR="$TARGET_MIRROR/musl"
|
||||
TARGET_TYPE="$(sed -e 's/ musl//' <<< "$TARGET_TYPE")"
|
||||
fi
|
||||
|
||||
echo -n "Copying repository keys... "
|
||||
|
@ -302,8 +317,6 @@ else
|
|||
echo "KEYMAP=\"$KBD_LAYOUT\"" >> /mnt/target/etc/rc.conf
|
||||
fi
|
||||
|
||||
#TODO: Figure out how to configure keyboard for Xorg
|
||||
|
||||
#TODO timezone
|
||||
|
||||
clear
|
||||
|
@ -372,7 +385,7 @@ mkdir /mnt/target/boot/efi/LOADER >> $LOGFILE 2>&1
|
|||
echo "GRUB has been deliberately installed to a non-standard location.
|
||||
This avoids default kernel hooks breaking the custom config." > /mnt/target/boot/efi/LOADER/README.TXT
|
||||
|
||||
# no idea if any of these are even necessary/relevant but it can’t hurt...
|
||||
# no idea if any of these are even necessary/relevant but it can't hurt...
|
||||
TARGET_PRELOAD_GRUB_MODULES="usb usbms uhci ehci ohci part_gpt f2fs ahci ata pata"
|
||||
run_in_target grub-install --target=i386-pc --boot-directory=/boot/efi/LOADER --disk-module=native --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'" >> $LOGFILE 2>&1
|
||||
run_in_target grub-install --target=i386-efi --boot-directory=/boot/efi/LOADER --disk-module=native --efi-directory=/boot/efi --removable --no-nvram --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'" >> $LOGFILE 2>&1
|
||||
|
@ -411,26 +424,14 @@ function get_stage2_file {
|
|||
wget --output-document="$STAGE2_DIR/$1" "$GIT_REPO_BASE/$1" >> $LOGFILE 2>&1
|
||||
}
|
||||
|
||||
get_stage2_file install-stage2.sh >> $LOGFILE 2>&1
|
||||
get_stage2_file "install-stage2.sh" >> $LOGFILE 2>&1
|
||||
chmod 744 "$STAGE2_DIR/install-stage2.sh" >> $LOGFILE 2>&1
|
||||
|
||||
get_stage2_file package_selections/sections.lst
|
||||
readarray -t SECTIONS < "$STAGE2_DIR/package_selections/sections.lst"
|
||||
for I in ${!SECTIONS[@]}; do
|
||||
get_stage2_file "package_selections/${SECTIONS[$I]}/description.txt"
|
||||
|
||||
get_stage2_file "package_selections/${SECTIONS[$I]}/options.lst"
|
||||
readarray -t OPTIONS < "$STAGE2_DIR/package_selections/${SECTIONS[$I]}/options.lst"
|
||||
for J in ${!OPTIONS[@]}; do
|
||||
get_stage2_file "package_selections/${SECTIONS[$I]}/${OPTIONS[$J]}"
|
||||
done
|
||||
|
||||
get_stage2_file "package_selections/${SECTIONS[$I]}/additional_files.lst"
|
||||
readarray -t FILES < "$STAGE2_DIR/package_selections/${SECTIONS[$I]}/additional_files.lst"
|
||||
for J in ${!FILES[@]}; do
|
||||
get_stage2_file "package_selections/${SECTIONS[$I]}/${FILES[$J]}"
|
||||
done
|
||||
done
|
||||
# Stage 2 prefab environment/rice install scripts
|
||||
get_stage2_file "custom-scripts/scripts.lst"
|
||||
while read -r NEXT_SCRIPT; do
|
||||
[ -n "$NEXT_SCRIPT" ] && get_stage2_file "custom-scripts/$NEXT_SCRIPT"
|
||||
done < "$STAGE2_DIR/custom-scripts/scripts.lst"
|
||||
|
||||
mv /mnt/target/etc/sv/agetty-tty1/conf /mnt/target/etc/sv/agetty-tty1/conf.bak >> $LOGFILE 2>&1
|
||||
echo 'if [ -x /sbin/agetty -o -x /bin/agetty ]; then
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
LOGFILE=/tmp/void-usb-install-log
|
||||
STAGE2_DIR="/opt/void-usb/installer/"
|
||||
|
||||
function press_any_key {
|
||||
echo "Press any key to continue or Ctrl+c to abort..."
|
||||
|
@ -69,6 +70,7 @@ Alternatively, you can continue without internet but the system will be left in
|
|||
echo -n "."
|
||||
done
|
||||
echo " $INTERNET"
|
||||
# TODO: allow to connect again if still no internet
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -78,42 +80,78 @@ if [ "$INTERNET" = "up" ]; then
|
|||
echo "done"
|
||||
fi
|
||||
|
||||
readarray -t SECTIONS < /opt/void-usb/installer/package_selections/sections.lst
|
||||
for I in ${!SECTIONS[@]}; do
|
||||
readarray -t OPTIONS < "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/options.lst"
|
||||
AVAILABLE_OPTIONS=()
|
||||
for J in ${!OPTIONS[@]}; do
|
||||
source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/${OPTIONS[$J]}"
|
||||
if check; then
|
||||
AVAILABLE_OPTIONS+=("${OPTIONS[$J]}")
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "${AVAILABLE_OPTIONS[1]}" ]; then
|
||||
# no need to ask, there is only one option anyway
|
||||
CHOICE="${AVAILABLE_OPTIONS[0]}"
|
||||
else
|
||||
clear
|
||||
cat "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/description.txt"
|
||||
echo ""
|
||||
for J in ${!AVAILABLE_OPTIONS[@]}; do
|
||||
source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/${AVAILABLE_OPTIONS[$J]}"
|
||||
echo "$J: $DESCRIPTION"
|
||||
done
|
||||
CHOICE=""
|
||||
while [ -z "$CHOICE" ]; do
|
||||
echo ""
|
||||
echo "Select by entering the corresponding number."
|
||||
read -p "> " CHOICE_NUMBER
|
||||
grep "^[0-9]*$" <<< "$CHOICE_NUMBER" && CHOICE="${AVAILABLE_OPTIONS[$CHOICE_NUMBER]}"
|
||||
done
|
||||
fi
|
||||
CONFIG_DIR="$STAGE2_DIR/custom-scripts"
|
||||
SCRIPTS=()
|
||||
NAMES=()
|
||||
DESCRIPTIONS=()
|
||||
|
||||
source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/$CHOICE"
|
||||
if [ -n "$PACKAGES" ]; then
|
||||
xbps-install --yes $PACKAGES
|
||||
fi
|
||||
post_install
|
||||
echo "Scanning for configuration scripts in $CONFIG_DIR..."
|
||||
for script in "$CONFIG_DIR"/*.sh; do
|
||||
[ -f "$script" ] || continue # Skip if no .sh files found
|
||||
SCRIPTS+=("$script")
|
||||
|
||||
SCRIPT_NAME=$(grep '^# NAME:' "$script" | sed 's/^# NAME:[[:space:]]*//')
|
||||
[ -z "$SCRIPT_NAME" ] && SCRIPT_NAME="$(basename "$script")"
|
||||
|
||||
SCRIPT_DESC=$(grep '^# DESC:' "$script" | sed 's/^# DESC:[[:space:]]*//')
|
||||
[ -z "$SCRIPT_DESC" ] && SCRIPT_DESC="No description available."
|
||||
|
||||
NAMES+=("$SCRIPT_NAME")
|
||||
DESCRIPTIONS+=("$SCRIPT_DESC")
|
||||
done
|
||||
|
||||
bash --norc --noprofile
|
||||
# Check if no scripts were found
|
||||
if [ ${#SCRIPTS[@]} -eq 0 ]; then
|
||||
echo "No configuration scripts found in $CONFIG_DIR."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Available configurations:"
|
||||
for i in "${!SCRIPTS[@]}"; do
|
||||
echo "$((i+1)): ${NAMES[i]} - ${DESCRIPTIONS[i]}"
|
||||
done
|
||||
echo "$(( ${#SCRIPTS[@]} + 1 )): Exit"
|
||||
|
||||
CHOICE=0
|
||||
while ! (( CHOICE >= 1 && CHOICE <= ${#SCRIPTS[@]} )); do
|
||||
read -p "Select an option [1-$((${#SCRIPTS[@]}+1))]: " CHOICE
|
||||
if (( CHOICE >= 1 && CHOICE <= ${#SCRIPTS[@]} )); then
|
||||
echo "Running: ${NAMES[CHOICE-1]}"
|
||||
bash "${SCRIPTS[CHOICE-1]}"
|
||||
elif (( CHOICE == ${#SCRIPTS[@]} + 1 )); then
|
||||
echo "Exiting..."
|
||||
break
|
||||
else
|
||||
echo "Invalid choice."
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Setting up user..."
|
||||
read -p "Enter username: " NEW_USER
|
||||
#TODO: let the user choose additional groups (suggest sane defaults for different use cases)
|
||||
# cdrom? optical? storage? what they do?
|
||||
# scanner
|
||||
# network (check if this even still does anything)
|
||||
# kvm
|
||||
# audio, video
|
||||
# dialout
|
||||
# users (dows this even do anything)
|
||||
useradd -m -s /bin/bash -G wheel "$NEW_USER"
|
||||
passwd "$NEW_USER"
|
||||
|
||||
echo "Cleaning up installation files..."
|
||||
mv /mnt/target/etc/sv/agetty-tty1/conf.bak /mnt/target/etc/sv/agetty-tty1/conf >> $LOGFILE 2>&1
|
||||
if [ -f /root/.profile.bak ]; then
|
||||
mv /root/.profile.bak /root/.profile
|
||||
else
|
||||
rm /root/.profile
|
||||
fi
|
||||
rm -rf "$STAGE2_DIR"
|
||||
|
||||
clear
|
||||
echo "To save the changes made to the system, a new system image needs to be created.
|
||||
|
||||
The system will reboot now. While shutting down, you will be asked about creating a system image. Choose yes."
|
||||
|
||||
reboot
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
TODO:
|
||||
make sure that gufw works as intended
|
||||
check for Nvidia Optimus support - or make it happen somehow
|
||||
compare sizes of glibc and musl installations
|
||||
need xdg menu maker?
|
||||
adjust required USB stick and RAM size in README
|
||||
|
@ -9,114 +7,27 @@ do not rely on the RTC
|
|||
- use ntp to get time
|
||||
- only fall back to using rtc if offline
|
||||
- do not set the RTC
|
||||
make our own or extract (if feasible) kb selection and time zone selection to hijack them for our purposes
|
||||
- potentially interesting packages
|
||||
- ckbcomp
|
||||
- kbd-data
|
||||
make our own time zone selection
|
||||
keyboard?
|
||||
overview of the installation process at the start
|
||||
overall progress indication (step x out of y)
|
||||
look into roxterm as an alternative terminal
|
||||
deal with the entropy thing that runs after rc.shutdown
|
||||
first run message in .xinitrc.d
|
||||
- auto-removes itself
|
||||
- displays README.txt on root dir of the F2FS partition
|
||||
add online check to all the selections that need internet
|
||||
sort out /etc/resolv.conf for the chroot
|
||||
set keyboard layout for initramfs
|
||||
tell user about expected GRUB error messaegs
|
||||
disable suspend and hibernate
|
||||
when shutting down, let Xorg exit first, then run `loginctl {poweroff,reboot}`
|
||||
add polkit to common packages
|
||||
disable hibernate, warn about suspend
|
||||
use zswap
|
||||
rices: when shutting down, let Xorg exit first, then run `loginctl {poweroff,reboot}`
|
||||
- this is needed so the user can interact with the console
|
||||
https://github.com/aarnt/octoxbps
|
||||
system-image
|
||||
check that all output goes to current TTY
|
||||
|
||||
package selections:
|
||||
desktop
|
||||
icewm-full
|
||||
packages
|
||||
-> audio applet -> volctl
|
||||
-> system monitor, file browser, image viewer, text editor, archive manager
|
||||
-> GUI package manager? GUI update manager?
|
||||
-> notification daemon?
|
||||
xscreensaver
|
||||
blueman
|
||||
-> BT support?
|
||||
post-install
|
||||
add ultimate.bashrc
|
||||
add backgrounds
|
||||
modify bashrc to auto-start X if not already running
|
||||
kick off scripts in .xinitrc.d from .xinitrc
|
||||
exec icewm-session from .xinitrc
|
||||
add to .xinitrc.d
|
||||
start pipewire, pipewire-pulse, wireplumber
|
||||
start conky
|
||||
start desktop applets
|
||||
volctl &
|
||||
nm-applet &
|
||||
blueman-applet &
|
||||
display README
|
||||
start xscreensaver
|
||||
xscreensaver --no-splash &
|
||||
start conky
|
||||
conky &
|
||||
put README.txt with relevant information on root dir of F2FS partition
|
||||
symlink to /home/README.txt
|
||||
add a symlink ~/.local/bin/xterm that points to lxterminal
|
||||
configure icewm
|
||||
startup script
|
||||
choose random background
|
||||
configuration
|
||||
configure conky
|
||||
configure xscreensaver
|
||||
icewm-lite
|
||||
post-install
|
||||
add ultimate.bashrc
|
||||
modify bashrc to auto-start X if not already running
|
||||
kick off scripts in .xinitrc.d from .xinitrc
|
||||
exec icewm (not session) from .xinitrc
|
||||
add to .xinitrc.d
|
||||
start pipewire, pipewire-pulse, wireplumber
|
||||
display README
|
||||
put README.txt with relevant information on root dir of F2FS partition
|
||||
symlink to /home/README.txt
|
||||
configure icewm
|
||||
none
|
||||
post-install
|
||||
add ultimate.bashrc
|
||||
modify bashrc to display README
|
||||
put README.txt with relevant information on root dir of F2FS partition
|
||||
symlink to /home/README.txt
|
||||
|
||||
|
||||
musl downsides:
|
||||
- no nvidia drivers
|
||||
- may be janky in regards to running some Minecraft versions
|
||||
musl upsides:
|
||||
- ??
|
||||
|
||||
Stage 1:
|
||||
-> select kb layout
|
||||
-> select installation type (x86_32/x86_64, glibc/musl)
|
||||
-> configure time zone
|
||||
-> selection dialog?
|
||||
-> symlink /etc/localtime
|
||||
|
||||
Stage 2:
|
||||
-> set up user
|
||||
-> ask for username
|
||||
-> run useradd (non-interactively)
|
||||
-> useradd --groups "comma,separated,groups" --create-home --shell /bin/bash $USERNAME
|
||||
-> groups: dialout users wheel
|
||||
-> ?? groups:
|
||||
-> cdrom optical - can listen to CDs? Can watch DVDs? Can mount / unmount CDs/DVDs?
|
||||
-> storage - can mount / unmount disks from GUI?
|
||||
-> scanner - can scan things (for example using XSane?)
|
||||
-> network - can interface with NetworkManager?
|
||||
-> kvm - can run QEMU?
|
||||
-> run passwd (interactively)
|
||||
-> clean up
|
||||
-> mv /mnt/target/etc/sv/agetty-tty1/conf.bak /mnt/target/etc/sv/agetty-tty1/conf
|
||||
-> if [ -f /mnt/target/root/.profile.bak ]; then mv /mnt/target/root/.profile.bak /mnt/target/root/.profile; else rm /mnt/target/root/.profile; fi
|
||||
-> rm -r /opt/void-usb/installer
|
||||
-> build new squashfs image and reboot
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# Package Selections
|
||||
|
||||
These are intended to give the user a bunch of choices when installing the
|
||||
system. For example whether to use XFE or a more fully featured set of applications.
|
||||
|
||||
## Sections
|
||||
|
||||
Sections contain choices of a specific category. The sections are stored in
|
||||
folders containing the section’s description and its options.
|
||||
For each section, only one of the options can be chosen.
|
||||
The file `sections.lst` holds a list of all available sections in the order
|
||||
in which the user will be asked about them.
|
||||
|
||||
## Options
|
||||
|
||||
Options are shell scripts that are sourced by the stage 2 installer.
|
||||
They hold variables for description, package list, pre-install checks,
|
||||
and additional post-install actions.
|
||||
Options are shown in the order in which they appear in `options.lst`.
|
|
@ -1,3 +0,0 @@
|
|||
resources/common_packages
|
||||
resources/xinitrc
|
||||
resources/bashrc
|
|
@ -1 +0,0 @@
|
|||
Choose a desktop setup to install
|
|
@ -1,13 +0,0 @@
|
|||
function check {
|
||||
[ "$INTERNET" = "down" ] && return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
DESCRIPTION="Fully featured desktop with IceWM"
|
||||
|
||||
# TODO
|
||||
PACKAGES="$(cat /opt/void-usb/installer/package_selections/desktop/resources/common_packages) pavucontrol network-manager-applet vlc lxterminal bash-completion gufw conky icewm firefox arandr xscreensaver-elogind volctl"
|
||||
|
||||
function post_install {
|
||||
echo "desktop/icewm-light" >> /tmp/stage-2-choices
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
function check {
|
||||
[ "$INTERNET" = "down" ] && return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
DESCRIPTION="Small desktop with IceWM"
|
||||
|
||||
# TODO
|
||||
PACKAGES="$(cat /opt/void-usb/installer/package_selections/desktop/resources/common_packages) pulsemixer xterm icewm firefox htop xfe"
|
||||
|
||||
function post_install {
|
||||
echo "desktop/icewm-light" >> /tmp/stage-2-choices
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
function check {
|
||||
return 0
|
||||
}
|
||||
|
||||
DESCRIPTION="Leave the system as-is (no desktop)"
|
||||
|
||||
PACKAGES=""
|
||||
|
||||
function post_install {
|
||||
echo "desktop/none" >> /tmp/stage-2-choices
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
icewm-full
|
||||
icewm-lite
|
||||
none
|
|
@ -1,94 +0,0 @@
|
|||
# ALWAYS RUN
|
||||
# ==========
|
||||
# things to always set up, even for non-interactive shells
|
||||
|
||||
EDITOR=nano
|
||||
PAGER=less
|
||||
|
||||
if grep -F ".local/bin" <<< "$PATH"; then
|
||||
true
|
||||
else
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
export EDITOR PAGER PATH
|
||||
|
||||
# CHECK INTERACTIVE
|
||||
# =================
|
||||
# Don't do anything after this if not running an interactive shell.
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return ;;
|
||||
esac
|
||||
|
||||
# START XORG
|
||||
# ==========
|
||||
# TODO
|
||||
# check if login shell
|
||||
# if yes, check if .xinitrc exists
|
||||
# if yes, check if xorg is already running
|
||||
# if no, startx
|
||||
|
||||
# ALIASES
|
||||
# =======
|
||||
alias aliases="nano $HOME/.bashrc_aliases && source $HOME/.bashrc_aliases"
|
||||
[ -f $HOME/.bashrc_aliases ] && source $HOME/.bashrc_aliases
|
||||
|
||||
# BASH COMPLETION
|
||||
# ===============
|
||||
# include bash completions if they exist
|
||||
# (may need to be adjusted to where the bash completions are stored on the current system)
|
||||
|
||||
# Default for FreeBSD:
|
||||
if [ -f /usr/local/share/bash-completion/bash_completion.sh ]; then
|
||||
source /usr/local/share/bash-completion/bash_completion.sh
|
||||
# Default for Linux:
|
||||
elif [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
source /usr/share/bash-completion/bash_completion
|
||||
fi
|
||||
|
||||
# VARIABLES
|
||||
# =========
|
||||
|
||||
# don't put duplicate lines or lines starting with a space in history
|
||||
HISTCONTROL=ingnoreboth
|
||||
# unlimited history
|
||||
HISTSIZE=-1
|
||||
HISTFILESIZE=-1
|
||||
# set a fancy prompt
|
||||
PROMPT_COMMAND="PS1=\"[\[\e[03$(
|
||||
if [ $EUID -eq 0 ]
|
||||
then
|
||||
echo -n '1;02m'
|
||||
else
|
||||
if [ -n "$(groups | grep 'wheel\|sudo')" ];
|
||||
then
|
||||
echo -n '2;01m'
|
||||
else
|
||||
echo -n '6;01m'
|
||||
fi
|
||||
fi
|
||||
)\]\u@\h\[\e[0m\]]:\$(
|
||||
PROMPT_ERRORLEVEL=\$?
|
||||
if [ \$PROMPT_ERRORLEVEL -eq 0 ]
|
||||
then
|
||||
echo -n '\[\e[032;02m\]'
|
||||
else
|
||||
echo -n '\[\e[031;02m\]'
|
||||
fi
|
||||
echo -n \$PROMPT_ERRORLEVEL
|
||||
echo -n '\[\e[00m\]'
|
||||
):\[\e[034;01m\]\$(pwd)\[\e[0m\]:$(
|
||||
if [ $EUID -eq 0 ]
|
||||
then
|
||||
echo -n '\[\e[02m\]#\[\e[0m\]'
|
||||
else
|
||||
echo -n '\[\e[02m\]$\[\e[0m\]'
|
||||
fi
|
||||
)> \""
|
||||
|
||||
# SHELL OPTIONS
|
||||
# =============
|
||||
shopt -s histappend
|
||||
shopt -s checkwinsize
|
||||
shopt -s globstar
|
|
@ -1 +0,0 @@
|
|||
setxkbmap xauth xorg-video-drivers mesa mesa-dri xorg-server elogind xorg-input-drivers xrandr acpilight xhost xinit xrdb xinput xgamma xset iceauth sessreg transset xcmsdb xkbutils xmodmap dejavu-fonts-ttf elogind xdg-utils dbus-elogind dbus-elogind-libs dbus-elogind-x11 pipewire
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if grep -F ".local/bin" <<< "$PATH"; then
|
||||
true
|
||||
else
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
export PATH
|
||||
|
||||
if [ -d "$HOME/.xinitrc.d" ]; then
|
||||
for FILE in "$HOME/.xinitrc.d"/*; do
|
||||
[ -x "$FILE" ] && "$FILE" &
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# The line below is placed by the package selection script.
|
|
@ -1,10 +0,0 @@
|
|||
Do you want to install the proprietary Nvidia driver?
|
||||
|
||||
By default, Void Linux ships with the open-source nouveau driver.
|
||||
This is nice because it gets the system up and running when using an
|
||||
Nvidia GPU but, due to Nvidia’s secrecy, nouveau isn’t particularly good.
|
||||
|
||||
Installing the proprietary driver is recommended if you want to use Nvidia GPUs.
|
||||
This will enable the nonfree repository.
|
||||
|
||||
Different versions are available. You can only choose one.
|
|
@ -1,11 +0,0 @@
|
|||
function check {
|
||||
return 0
|
||||
}
|
||||
|
||||
DESCRIPTION="Don’t install."
|
||||
|
||||
PACKAGES=""
|
||||
|
||||
function post_install {
|
||||
echo "nvidia/none" >> /tmp/stage-2-choices
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
function check {
|
||||
[ "$INTERNET" = "down" ] && return 1
|
||||
if xbps-query glibc >/dev/null 2>&1; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
DESCRIPTION="Latest Nvidia driver, supports GTX ??? series and up"
|
||||
|
||||
#TODO: void-repo-nonfree
|
||||
PACKAGES="nvidia"
|
||||
|
||||
function post_install {
|
||||
#TODO: nvidia modeset kernel parameter?
|
||||
echo "nvidia/nvidia" >> /tmp/stage-2-choices
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
function check {
|
||||
[ "$INTERNET" = "down" ] && return 1
|
||||
if xbps-query glibc >/dev/null 2>&1; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
DESCRIPTION="Legacy Nvidia driver, version 390, supports GTX ??? series"
|
||||
|
||||
#TODO: void-repo-nonfree
|
||||
PACKAGES="nvidia390"
|
||||
|
||||
function post_install {
|
||||
#TODO: nvidia modeset kernel parameter?
|
||||
echo "nvidia/nvidia390" >> /tmp/stage-2-choices
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
function check {
|
||||
[ "$INTERNET" = "down" ] && return 1
|
||||
if xbps-query glibc >/dev/null 2>&1; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
DESCRIPTION="Legacy Nvidia driver, version 470, supports GTX ??? series"
|
||||
|
||||
#TODO: void-repo-nonfree
|
||||
PACKAGES="nvidia470"
|
||||
|
||||
function post_install {
|
||||
#TODO: nvidia modeset kernel parameter?
|
||||
echo "nvidia/nvidia470" >> /tmp/stage-2-choices
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
none
|
||||
nvidia
|
||||
nvidia470
|
||||
nvidia390
|
|
@ -1,2 +0,0 @@
|
|||
nvidia
|
||||
desktop
|
Loading…
Reference in New Issue