Compare commits

...

No commits in common. "main" and "test" have entirely different histories.
main ... test

53 changed files with 376 additions and 684 deletions

25
config
View File

@ -1,17 +1,12 @@
lastminute() {
echo lastminute
#addpkg vlc
#servicesenable sshd
#servicesdisable sshd
#ignorepkg openssh
#removepkg mpv
}
gnome_apps="seahorse seahorse-nautilus evince"
kde5_apps="kde5-baseapps kdegraphics-thumbnailers ffmpegthumbs ark gwenview kmail okular spectacle kalarm kcalc print-manager plasma-browser-integration kwalletmanager"
i3wm_apps="claws-mail galculator-gtk3"
os_config() {
echo os config
addpkg tmux starship vivid browserpass nfs-utils chezmoi pipewire alsa-pipewire libjack-pipewire libspa-v4l2 pass xclip
addpkg zsh zsh-autosuggestions zsh-completions zsh-history-substring-search zsh-syntax-highlighting google-fonts-ttf
addpkg tigervnc keychain youtube-dl buku i3status-rust aria2 zenity
servicesenable sshd
removepkg i3status
lastminute() {
#addpkg thunderbird-i18n-de
#addpkg mpv mpv-mpris
servicesenable sshd
#servicesdisable
#ignorepkg
#removepkg
}

View File

@ -11,5 +11,5 @@ echo "xr = sudo xbps-remove -R deinstallieren"
echo "xs = xbps-query -Rs suchen"
echo ""
echo "backup backup machen"
echo "snapshot snapshots einstellen"
echo "snapshot snapshots instellen"
echo ""

View File

@ -34,7 +34,7 @@ else
echo "Endpoint"
echo "Port"
echo ""
echo "Schicke ihm verschlüsselt (Matrix oder Email) folgende Daten:"
echo "Schicke ihm verschlüsselt (Jabber oder Email) folgende Daten:"
echo "PublicKey = $(cat pubkey)"
echo "PresharedKey = $(cat psk)"
echo "Hostname = ${HOSTNAME}"

View File

@ -1,22 +0,0 @@
#!/bin/sh
case $PINENTRY_USER_DATA in
tty)
exec pinentry-curses "$@"
;;
*)
if ! test -x ~/.config/pinentry; then
for i in pinentry-kwallet pinentry-qt pinentry-gnome3 pinentry-gtk-2 pinentry-emacs pinentry-dmenu pinentry-curses pinentry-tty; do
if command -v "${i}" > /dev/null; then
echo "#!/bin/sh" > ~/.config/pinentry
echo "${i} \${@}" >> ~/.config/pinentry
chmod +x ~/.config/pinentry
break
fi
done
fi
exec ~/.config/pinentry "$@"
;;
esac

View File

@ -28,89 +28,85 @@ do
fhelp
exit
;;
update) update=y ;;
passwd) passwd=y ;;
clean) do=clean ;;
run) do=run ;;
update)
update=y
;;
passwd)
passwd=y
;;
esac
done
test -z "${do}" && do=run
if [[ -f "${backupcfg}" ]]; then
source "${backupcfg}"
else
echo "${backupcfg} fehlt."
echo "Diese Datei wird normalerweise durch \`void-createbackupcontainer\`"
echo "angelegt. Bitte Sprich mit deinem Systemadministrator."
fi
if [[ ! -f /etc/btrbk/btrbk.conf ]]; then
if [[ -f "${backupcfg}" ]]; then
source "${backupcfg}"
else
echo "${backupcfg} fehlt."
echo "Diese Datei wird normalerweise durch \`void-createbackupcontainer\`"
echo "angelegt. Bitte Sprich mit deinem Systemadministrator."
if [ -z "${UUID}" ]; then
echo "Keine Backupplatte angegeben."
exit 1
fi
if [ ! -e "/dev/disk/by-uuid/${UUID}" ]; then
echo "Bitte Backupfestplatte anschliessen."
exit 1
fi
if [ -e /tmp/backup ]; then
echo "Es läuft schon ein Backupvorgang oder wurde nicht richtig beendet."
echo "Bei letzterem: 'sudo rm -rf /tmp/backup'"
exit 1
fi
touch /tmp/backup
if [[ "${passwd}" == "y" ]]; then
cryptsetup luksChangeKey "/dev/disk/by-uuid/${UUID}"
rm -rf /tmp/backup
exit 0
fi
function finish {
sync
if [ "${poweroff}" = "y" ]; then
shutdown -h now
fi
if [ -z "${UUID}" ]; then
echo "Keine Backupplatte angegeben."
exit 1
sleep 4
umount "${ziel}"
echo " "
echo " "
if [[ "${MOUNTEDBY}" == "script" ]]; then
cryptsetup close "luks-${UUID}"
echo "Festplatte kann nun sicher entfernt werden."
elif [[ "${MOUNTEDBY}" == "gnome" ]]; then
echo "Festplatte bitte mit der grafischen Oberflaeche auswerfen (wie ein USB-Stick)"
echo ""
echo "oder:"
echo "sudo umount /dev/mapper/luks-${UUID}"
echo "sudo cryptsetup close luks-${UUID}"
echo ""
fi
rm -rf /tmp/backup
echo "FERTIG"
if [ ! -e "/dev/disk/by-uuid/${UUID}" ]; then
echo "Bitte Backupfestplatte anschliessen."
exit 1
fi
}
trap finish EXIT
if [ -e /tmp/backup ]; then
echo "Es läuft schon ein Backupvorgang oder wurde nicht richtig beendet."
echo "Bei letzterem: 'sudo rm -rf /tmp/backup'"
exit 1
fi
touch /tmp/backup
if [[ "${passwd}" == "y" ]]; then
cryptsetup luksChangeKey "/dev/disk/by-uuid/${UUID}"
rm -rf /tmp/backup
exit 0
fi
function finish {
sync
if [ "${poweroff}" = "y" ]; then
shutdown -h now
fi
sleep 4
umount "${ziel}"
echo " "
echo " "
if [[ "${MOUNTEDBY}" == "script" ]]; then
cryptsetup close "luks-${UUID}"
echo "Festplatte kann nun sicher entfernt werden."
elif [[ "${MOUNTEDBY}" == "de" ]]; then
echo "Festplatte bitte mit der grafischen Oberflaeche auswerfen (wie ein USB-Stick)"
echo ""
echo "oder:"
echo "sudo umount /dev/mapper/luks-${UUID}"
echo "sudo cryptsetup close luks-${UUID}"
echo ""
fi
rm -rf /tmp/backup
echo "FERTIG"
}
trap finish EXIT
if mountpoint -q -x "/dev/mapper/luks-${UUID}" > /dev/null; then
MOUNTEDBY="de"
else
if ! cryptsetup open UUID="${UUID}" "luks-${UUID}"; then
echo "Konnte /dev/disk/by-uuid/${UUID} nicht öffnen."
exit
fi
MOUNTEDBY="script"
fi
if ! mount "/dev/mapper/luks-${UUID}" "${ziel}"; then
echo "Konnte /dev/mapper/luks-${UUID} in ${ziel} nicht mounten."
if [ ! $(mountpoint -q -x "/dev/mapper/luks-${UUID}") ]; then
if ! cryptsetup open UUID="${UUID}" "luks-${UUID}"; then
echo "Konnte /dev/disk/by-uuid/${UUID} nicht öffnen."
exit
fi
MOUNTEDBY="script"
else
cfg="/etc/btrbk/btrbk.conf"
MOUNTEDBY="gnome"
fi
if ! mount "/dev/mapper/luks-${UUID}" "${ziel}"; then
echo "Konnte /dev/mapper/luks-${UUID} in ${ziel} nicht mounten."
exit
fi
if mountpoint -q /var/lib/backup/quelle/bootfs; then
@ -118,11 +114,10 @@ if mountpoint -q /var/lib/backup/quelle/bootfs; then
boot="backupboot"
fi
mkdir -p /var/lib/backup/quelle/rootfs/system/backup "/var/lib/backup/ziel/void/rootfs" "/var/lib/backup/ziel/void/homefs"
mkdir -p /var/lib/backup/quelle/rootfs/system/backup "/var/lib/backup/ziel/void/{rootfs,homefs}"
for t in backup "${boot}"; do
if [[ "${t}" ]]; then
btrbk --config="${cfg}" --progress --quiet clean "${t}"
if ! btrbk --config="${cfg}" --progress --quiet "${do}" "${t}"; then
if ! btrbk --config="${cfg}" --progress --quiet run "${t}"; then
btrbk --config="${cfg}" --progress --quiet clean
echo "Wegen Fehler nicht herunterfahren."
poweroff=n

View File

@ -88,6 +88,17 @@ if ! mkfs.btrfs -f "/dev/mapper/luks-${UUID}"; then
exit 1
fi
if ! mount "/dev/mapper/luks-${UUID}" "/var/lib/backup/ziel"; then
echo "Konnte /dev/mapper/luks-${UUID} nicht nach /var/lib/backup/ziel mounten"
exit 1
fi
if mountpoint -q /boot; then
mkdir -p "/var/lib/backup/ziel/void/bootfs"
fi
mkdir -p "/var/lib/backup/ziel/void/{rootfs,homefs}"
umount "/var/lib/backup/ziel"
cryptsetup close "luks-${UUID}"
echo "UUID=\"${UUID}\"" > "${backupcfg}"

View File

@ -7,19 +7,14 @@ fi
infos() {
echo "Snapshots sind Kopien der Dateien die keinen zusätzlichen Platz"
echo "benötigen."
echo ""
echo "Es wird bei jedem Update vom Betriebsystem ein Snapshot angelegt."
echo "Es wird jede volle Stunde vom Betriebsystem ein Snapshot angelegt."
echo "Es wird bei jede volle Stunde vom Betriebsystem ein Snapshot angelegt."
echo "So ist das Betriebssystem auch bei Problemen bootbar."
echo ""
echo "Optional kann auch jede Stunde ein Snapshot der persönlichen Daten"
echo "angelegt werden. Dann verliert man bei versehentlichem löschen"
echo "maximal die Arbeit einer Stunde."
echo "Dafür folgendes im Terminal ausführen:"
echo 'echo REGULAR_SNAPSHOT_HOME=1 | sudo tee -a /etc/void-snapshot.cfg'
echo ""
echo "Nur für Experten:"
echo 'echo NO_UPDATE_GRUB=1 | sudo tee -a /etc/void-snapshot.cfg'
echo "Dafuer folgendes im Terminal ausführen:"
echo 'echo REGULAR_SNAPSHOT_HOME=1 | sudo tee /etc/void-snapshot.cfg'
}
cron=""
@ -35,6 +30,7 @@ case $1 in
;;
*)
infos
echo "Falscher aufruf"
exit
;;
esac
@ -45,7 +41,6 @@ if [ "$#" -eq "0" ]; then
fi
cfg="/etc/btrbk/btrbk.conf.void"
test -f "/etc/btrbk/btrbk.conf" && cfg="/etc/btrbk/btrbk.conf"
if mountpoint -q /var/lib/backup/quelle/bootfs; then
mkdir -p "/var/lib/backup/quelle/bootfs/system/snapshots/${word}"
@ -63,23 +58,15 @@ if ! btrbk --config="${cfg}" --quiet run "${word}root"; then
exit
fi
test -f /etc/void-snapshot.cfg && . /etc/void-snapshot.cfg
if [[ -z "${NO_UPDATE_GRUB}" ]]; then
if ! update-grub 2> /dev/null; then
echo update-grub failed
exit
fi
if ! update-grub 2> /dev/null; then
echo update-grub failed
fi
if [ "${cron}" ]; then
test -f /etc/void-snapshot.cfg && . /etc/void-snapshot.cfg
if [ "${REGULAR_SNAPSHOT_HOME}" ]; then
mkdir -p "/var/lib/backup/quelle/rootfs/system/snapshots/${word}"
if ! btrbk --config="${cfg}" --quiet run "${word}home"; then
btrbk --config="${cfg}" --quiet clean "${word}home"
echo "fail: btrbk --config=${cfg} --quiet clean ${word}home"
exit
fi
btrbk --config="${cfg}" --quiet run "${word}home"
fi
fi

42
files/bin/void-update Executable file → Normal file
View File

@ -5,22 +5,18 @@ if [ $UID -ne 0 ]; then
exit 1
fi
RESTART=""
set -Eeuo pipefail
RESTART=
echo "Synchronisiere Repositorys."
echo "Synchronisiere Repositorys"
xbps-install -S > /dev/null
#mapfile -t updatedpkgs < <(xbps-install -un|awk '{print $1}')
updatedpkgs="$(xbps-install -un|awk '{print $1}')"
if [[ -z "${updatedpkgs}" ]]; then
mapfile -t updatedpkgs < <(xbps-install -un|awk '{print $1}')
if [[ "${#updatedpkgs[@]}" -eq 0 ]]; then
echo "Keine Updates"
exit
else
echo "${updatedpkgs}"
echo "${updatedpkgs[@]}"
echo "Es sind Updates da!"
while read -p "Installieren? [Y/n] " answer; do
test -z "${answer}" && answer="y"
@ -33,40 +29,36 @@ else
;;
esac
done
if grep -q -Pe '^(?!.*linux-).*^linux' <<< "${updatedpkgs}"; then
RESTART=1
fi
fi
echo "Lege Snapshot an."
void-snapshot update
echo "Entferne nicht benutzte Pakete."
echo "Entferne nicht benutzte Pakete"
xbps-remove -oy > /dev/null
echo "Räume den Cache auf."
echo "Räume den Cache auf"
xbps-remove -Oy > /dev/null
echo "Installiere Updates."
echo "Installiere Updates"
if ! xbps-install -uy; then
echo "Update failed."
exit
fi
if [[ "$RESTART" ]]; then
echo "Lösche alte Kernel."
vkpurge list | head -n -1 | xargs -r vkpurge rm
else
echo "Überprüfe ob neustart notwenidig ist."
if [[ "$(xcheckrestart)" ]]; then
RESTART=1
fi
if [[ "$(xcheckrestart)" ]]; then
RESTART=1
fi
for i in "${updatedpkgs[@]}"; do
if grep -q "^linux" <<< "${i}"; then
vkpurge list | head -n -1 | xargs -r vkpurge rm
RESTART=1
fi
done
if [[ "${RESTART}" ]]; then
echo ""; echo "Bitte den Computer neu starten!"
else
echo ""; echo "Kein neustart notwendig!"
echo ""; echo "Bitte den Computer neu starten."
fi
echo ""

View File

@ -1,7 +0,0 @@
pinentry-program /usr/bin/pinentry-chooser
enable-ssh-support
default-cache-ttl 28800
max-cache-ttl 86400
ignore-cache-for-signing

View File

@ -12,7 +12,7 @@ GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("@" "rootfs" "bootfs" "homefs")
# Default: ("var/lib/docker" "@var/lib/docker" "@/var/lib/docker")
GRUB_BTRFS_IGNORE_PREFIX_PATH=("var/lib/docker" "@var/lib/docker" "@/var/lib/docker" "system/backup")
GRUB_BTRFS_SUBMENUNAME="Void Linux Snapshots"
GRUB_BTRFS_SUBMENUNAME="Void Linux snapshots"
GRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION="true"
GRUB_BTRFS_DISPLAY_PATH_SNAPSHOT="false"
GRUB_BTRFS_TITLE_FORMAT="d"

View File

@ -10,11 +10,13 @@ if [ -f /etc/wireguard/wg0.conf ]; then
*)
case "$ACTION" in
up)
wg-quick up wg0
;;
down)
wg-quick down wg0
;;
wg-quick up wg0
#wg set wg0 peer ZJwTV2l+N+vFwL0KFQb5xpAPqwVcf0YvEMFzTaIoAU8= endpoint home.rotce.de:51820
;;
down)
wg-quick down wg0
#ip link delete dev wg0
;;
esac
;;
esac

View File

@ -7,10 +7,4 @@ appendpath () {
esac
}
if [ $(id -u) -eq 0 ]; then
appendpath "/root/.local/bin"
else
appendpath "/home/$(id -un)/.local/bin"
fi
export PATH
appendpath '${HOME}/.local/bin'

View File

@ -4,6 +4,5 @@ Defaults umask = 022
Defaults passprompt="[sudo] Password: "
Defaults env_keep += "EDITOR"
Defaults env_keep += "SSH_CONNECTION"
Defaults env_keep += "TMUX"
%wheel ALL=(ALL) ALL

View File

@ -1,13 +0,0 @@
[Interface]
Address = fd23::23:5:200/64, 10.23.5.200/16
PrivateKey = gPxQ+J61DCyOfJj0wXVfAL1zeFnlhenDiIXTyeZ9NUc=
DNS = fd23::23:5:2, 10.23.5.2
[Peer]
PublicKey = ZJwTV2l+N+vFwL0KFQb5xpAPqwVcf0YvEMFzTaIoAU8=
Endpoint = 10.1.1.2:51820
PresharedKey = 4KUpGmysJLNsX5sdFPpVsyW5ONloXj7WTNpNtqTSZ9U=
####AllowedIPs = ::0/0, 0.0.0.0/0 leitet den ganzen traffic ueber den server
AllowedIPs = fd23::/64, 10.23.0.0/16
PersistentKeepalive = 25

View File

@ -4,5 +4,4 @@ Section "InputClass"
Option "XkbLayout" "de"
Option "XkbVariant" "nodeadkeys"
#Option "XkbOptions" "grp:alt_shift_toggle"
EndSection
EndSection

View File

@ -1,6 +0,0 @@
if [ "$DESKTOP_SESSION" = "i3" ]; then
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval "$(dbus-launch --sh-syntax --exit-with-x11)"
fi
fi

View File

@ -20,10 +20,8 @@ multiplechoice() {
for i in $(seq 1 "$(( ${#input[@]} - 1 ))"); do
if [[ "${i}" == "1" ]]; then
choices="${input[$i]}"
use="${input[$i]}"
else
choices="${choices}|${input[$i]}"
use+=" ${input[$i]}"
fi
done
while input "[${choices}]: " "${input[1]}"; do
@ -35,7 +33,7 @@ multiplechoice() {
done
if [[ -z "${done}" ]]; then
echo wronginput "${output}"
echo use these: "${use}"
echo use these: "${input[@]}"
else
break
fi

BIN
lala Normal file

Binary file not shown.

21
main.sh
View File

@ -2,10 +2,13 @@
dir="$(pwd)"
wrksrc="${dir}/tmp"
step="${dir}/step"
functions="${dir}/functions"
modules="${dir}/modules"
config_mods="${modules}/config"
install_mods="${modules}/install"
chroot_mods="${modules}/chroot"
vars="${wrksrc}/vars"
dest="/mnt"
dest="${wrksrc}/dest"
files="${dir}/files"
rm -rf "${vars}"
mkdir -p "${wrksrc}" "${vars}" "${dest}"
@ -14,27 +17,27 @@ declare -A users=()
#set -x
remote="https://alpha.de.repo.voidlinux.org/current"
#remote="https://void.cijber.net/current/"
xbps-install -Sy cryptsetup lvm2
source "${functions}"/functions
source "${dir}"/config
umounter "${dest}"
export run="config"
for i in $(find "${step}1" -mindepth 1 -maxdepth 1 -type f | sort -n ); do
test -f "${i}" && source "${i}"
for i in $(find "${modules}" -mindepth 1 -maxdepth 1 -type d | sort -n ); do
test -f "${i}"/config && source "${i}"/config
done
export run="postconfig"
for i in $(find "${step}2" -mindepth 1 -maxdepth 1 -type f | sort -n ); do
test -f "${i}" && source "${i}"
for i in $(find "${modules}" -mindepth 1 -maxdepth 1 -type d | sort -n ); do
test -f "${i}"/postconfig && source "${i}"/postconfig
done
mkdir -p "${dest}"/tmp/installer/tmp "${dest}"/etc
cp -rf /etc/resolv.conf "${dest}"/etc
cp -rf "${vars}" "${dest}"/tmp/installer/tmp
cp -rf "${step}3" "${dest}"/tmp/installer
cp -rf "${step}4" "${dest}"/tmp/installer
#rm -rf "${vars}"
cp -rf "${modules}" "${dest}"/tmp/installer
cp -rf "${files}" "${dest}"/tmp/installer
cp -rf "${functions}" "${dest}"/tmp/installer
cp -rf ./run_in_chroot.sh "${dest}"/tmp/installer

View File

@ -16,9 +16,6 @@ for i in $(find /dev/disk/by-id/ -type l -printf "%P\n"|grep -v "part" |tac); do
if [[ "${name}" == *"/dev/sr"* ]]; then
continue
fi
if [[ ! "${i}" == "usb"* ]] && [[ ! "${i}" == "ata"* ]] && [[ ! "${i}" == "nvm"* ]]; then
continue
fi
index=$(( index + 1 ))
size="$(fdisk -l "${name}" | head -n1 | awk '{print $3}')"
size=$(awk "BEGIN { printf(\"%.0f\n\", ${size}); }")
@ -113,29 +110,29 @@ if [[ ! "${cfg[fde_key_store]}" == "none" ]]; then
cfg+=( [diskpw]="${output}" )
fi
hibernate=0
if check yesno "Do you want to hibernate?" "y"; then
hibernate=1
setconf "add" "hibernate" "1"
fi
ramsize="$(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE) / (1024 * 1024)))"
ramsize="$(awk "BEGIN { printf(\"%.0f\n\", ${ramsize}/1024); }")"
if [[ "${ramsize}" -gt "0" ]] && [[ "${ramsize}" -le "2" ]]; then
if [[ "${ramsize}" -gt "0" ]] || [[ "${ramsize}" -le "2" ]]; then
test -z "${hibernate}" && swapsize="$(( ramsize * 2 ))"
test -z "${hibernate}" || swapsize="$(( ramsize * 3 ))"
elif [[ "${ramsize}" -gt "2" ]] && [[ "${ramsize}" -le "8" ]]; then
test -z "${hibernate}" && swapsize="${ramsize}"
test -z "${hibernate}" || swapsize="$(( ramsize * 2 ))"
elif [[ "${ramsize}" -gt "8" ]] && [[ "${ramsize}" -lt "15" ]]; then
elif [[ "${ramsize}" -gt "8" ]] && [[ "${ramsize}" -le "15" ]]; then
test -z "${hibernate}" && swapsize="${ramsize}"
test -z "${hibernate}" || swapsize="$(awk "BEGIN { printf(\"%.0f\n\", ${ramsize}*1.5); }")"
elif [[ "${ramsize}" -ge "15" ]]; then
elif [[ "${ramsize}" -gt "15" ]]; then
test -z "${hibernate}" && swapsize="4"
test -z "${hibernate}" || echo "hibernate not recommended, turning off" && hibernate="0" && swapsize="4"
test -z "${hibernate}" || read -p "hibernate not recommended, turning off" empty && hibernate="" && swapsize="4"
fi
setconf "add" "hibernate" "${hibernate}"
setconf "add" "bootsize" "4"
echo Configure rootfssize
while input "Size in G? [$(( disk[size] - swapsize - bootsize ))|rest]" "rest"; do
@ -150,11 +147,13 @@ while input "Size in G? [$(( disk[size] - swapsize - bootsize ))|rest]" "rest";
done
setconf "add" "fde_key_store" "${cfg[fde_key_store]}"
setconf "add" "fde_keystore" "${cfg[fde_key_store]}"
setconf "add" "FDE_KEY_STORE" "${cfg[fde_key_store]}"
setconf "add" "diskid" "${disk[id]}"
setconf "add" "swapsize" "${swapsize}"
setconf "add" "rootfssize" "${rootfssize}"
setconf "add" "wipe" "${cfg[wipe]}"
setconf "add" "diskname" "${disk[name]}"
setconf "add" "bootsize" "4"
#setconf "add" "target_part" "2"
setconf "add" "target_part" "2"
module end

View File

@ -0,0 +1,5 @@
if test -d /sys/firmware/efi; then
source "${modules}"/disk/uefi/postconfig
else
source "${modules}"/disk/bios/postconfig
fi

View File

@ -0,0 +1,18 @@
module start "installation" "Installation" "dontcheck"
for i in ${pkg[@]}; do
for j in ${removepkg[@]}; do
if [[ "${i}" == "${j}" ]]; then
continue 2
fi
done
toinstall+=( "$i" )
done
if [[ "${#toinstall[@]}" -gt 0 ]]; then
xbps-install -Sy "${toinstall[@]}"
else
echo nothing to do
fi
module end

View File

@ -10,18 +10,10 @@ if [[ "${#ignorepkg[@]}" -gt 0 ]]; then
done
fi
for i in ${pkg[@]}; do
for j in ${removepkg[@]}; do
if [[ "${i}" == "${j}" ]]; then
continue 2
fi
done
toinstall+=( "$i" )
done
mkdir -p "${dest}"/var/db/xbps
cp -rf /var/db/xbps/keys/ "${dest}"/var/db/xbps
inst base-system "${toinstall[@]}"
inst base-system
module end

View File

@ -0,0 +1,20 @@
module start "basesystem" "Configure Basesystem"
while input "hostname?" "void"; do
if check alnum "${output}"; then
setconf add hostname "${output}"
break
fi
done
setconf add "lang" "de_DE"
setconf add "lang_console" "de-latin1-nodeadkeys"
setconf add "timezone" "Europe/Berlin"
addpkg void-repo-multilib void-repo-multilib-nonfree void-repo-nonfree lvm2 cronie socklog-void ntp xtools wireguard-tools gnupg2 progress pwgen net-tools ncdu nmap mtr iotop hdparm smartmontools htop git neovim btrbk croc grub-btrfs
ignorepkg nvi gnupg
servicesenable acpid cronie socklog-unix nanoklogd uuidd agetty-tty1 agetty-tty2 agetty-tty3 agetty-tty4
servicesdisable agetty-tty6 agetty-tty5
module end

View File

@ -8,20 +8,12 @@ DESTDIR=
vmkdir() {
mkdir -p /"$1"
chmod 755 /"$1"
}
vinstall() {
src="$1"; tgt="$3"; rights="$2"
if [ "$4" ]; then
cp "${src}" "/${tgt}/${4}"
chmod="/${tgt}/${4}"
else
cp "${src}" "/${tgt}"
chmod="/${tgt}"
fi
chmod -R "${rights}" "${chmod}"
src=$1; tgt=$3; rights=$2
cp -fr "${src}" /"${tgt}"
chmod -R "${rights}" /"${tgt}"
}
vbin() {
@ -34,7 +26,6 @@ vbin "${FILESDIR}/bin/void-update"
vbin "${FILESDIR}/bin/void-backup"
vbin "${FILESDIR}/bin/void-snapshot"
vbin "${FILESDIR}/bin/void-createbackupcontainer"
vbin "${FILESDIR}/bin/pinentry-chooser"
vmkdir etc/sudoers.d
vinstall "${FILESDIR}/sudoers/10-common" 700 etc/sudoers.d
@ -51,8 +42,8 @@ vmkdir etc/btrbk
vinstall "${FILESDIR}/btrbk/btrbk.conf.void" 744 etc/btrbk
vmkdir etc/xbps.d
vinstall "${FILESDIR}/xbps/50-no-extract.conf" 755 etc/xbps.d
vinstall "${FILESDIR}/xbps/20-repo-rotce.de-pakete.conf" 755 etc/xbps.d
vinstall "${FILESDIR}/xbps/50-no-extract.conf" 744 etc/xbps.d
vinstall "${FILESDIR}/xbps/20-repo-rotce.de-pakete.conf" 744 etc/xbps.d
vmkdir etc/default/grub-btrfs
vinstall "${FILESDIR}/grub-btrfs/void.conf" 755 etc/default/grub-btrfs
@ -64,30 +55,28 @@ vinstall "${FILESDIR}/nm/unmanaged-tun.conf" 644 etc/NetworkManager/conf.d
vinstall "${FILESDIR}/nm/30-wg0" 744 etc/NetworkManager/dispatcher.d
vmkdir etc/profile.d
vinstall "${FILESDIR}/profile/append-path.sh" 644 etc/profile.d zz-append-path.sh
vinstall "${FILESDIR}/profile/append-path.sh" 644 etc/profile.d
vmkdir usr/share/X11/xorg.conf.d
vinstall "${FILESDIR}/xorg/10-keyboard.conf" 644 usr/share/X11/xorg.conf.d
vmkdir etc/skel
vinstall "${FILESDIR}/gnupg/gpg-agent.conf" 700 etc/skel
vmkdir etc/fonts/conf.d
ln -s /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf "${DESTDIR}/etc/fonts/conf.d/70-no-bitmaps.conf"
mkdir -p /etc/xbps.d/
{ echo "#ignorepkg=linux-firmware-amd";
echo "#ignorepkg=linux-firmware-intel";
echo "#ignorepkg=linux-firmware-nvidia";
echo "#ignorepkg=linux-firmware-broadcom";
echo "#ignorepkg=wifi-firmware"; } > /etc/xbps.d/10-ignore-firmware.conf
chmod 755 /etc/xbps.d/10-ignore-firmware.conf
{ echo "en_DK.UTF-8 UTF-8";
echo "de_DE.UTF-8 UTF-8";
echo "${cfg[lang]}.UTF-8 UTF-8";
echo "en_US.UTF-8 UTF-8"; } > /etc/default/libc-locales
echo "LANG=${cfg[lang]}.UTF-8" > /etc/locale.conf
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "KEYMAP=${cfg[lang_console]}" > /etc/vconsole.conf
echo "LANG=${cfg[lang]}.UTF-8" > /etc/locale-user.conf
cp -a /etc/profile.d/locale.sh /etc/profile.d/zz-locale-user.sh
sed -i 's/locale.conf/locale-user.conf/' /etc/profile.d/zz-locale-user.sh
@ -102,9 +91,6 @@ if [[ "${cfg[fde_key_store]}" == "once" ]]; then
{ echo "UUID=${cfg[bootuuid]} /boot btrfs defaults,subvol=bootfs 0 0";
echo "UUID=${cfg[bootuuid]} /var/lib/backup/quelle/bootfs btrfs defaults 0 0"; } >> /etc/fstab
fi
if test -d /sys/firmware/efi; then
echo "UUID=${cfg[efiuuid]} /boot/efi vfat defaults 0 0" >> /etc/fstab
fi
echo "${cfg[hostname]}" > /etc/hostname
ln -sf "/usr/share/zoneinfo/${cfg[timezone]}" /etc/localtime
@ -116,7 +102,7 @@ sed -i "/FONT=/s/^#//g" /etc/rc.conf
echo '0 * * * * /usr/bin/void-snapshot cron #void.system' > /var/spool/cron/root
if [[ ! ${cfg[fde_key_store]} == "none" ]]; then
echo "echo \"Install pw is 'oem'\"" > /etc/runit/core-services/99-changepwdisk.sh
echo "Install pw is 'oem'" > /etc/runit/core-services/99-changepwdisk.sh
echo "read -p \"Change PW for disk? y/n \" answer" >> /etc/runit/core-services/99-changepwdisk.sh
echo "if [ \"\${answer}\" = \"y\" ]; then" >> /etc/runit/core-services/99-changepwdisk.sh
echo " while ! cryptsetup luksChangeKey /dev/disk/by-uuid/${cfg[partuuid]}; do" >> /etc/runit/core-services/99-changepwdisk.sh
@ -126,7 +112,7 @@ if [[ ! ${cfg[fde_key_store]} == "none" ]]; then
echo "fi" >> /etc/runit/core-services/99-changepwdisk.sh
fi
echo "echo \"Install pw is 'oem'\"" > /etc/runit/core-services/99-changepwuser.sh
echo "Install pw is \'oem\'" > /etc/runit/core-services/99-changepwuser.sh
echo "read -p \"Change PW for ${users[name1]}? y/n \" answer" >> /etc/runit/core-services/99-changepwuser.sh
echo "if [ \"\${answer}\" = \"y\" ]; then" >> /etc/runit/core-services/99-changepwuser.sh
echo " while ! passwd ${users[name1]}; do" >> /etc/runit/core-services/99-changepwuser.sh

View File

@ -0,0 +1,2 @@
addpkg "grub"

View File

@ -11,13 +11,11 @@ if [[ ! "${cfg[fde_key_store]}" == "none" ]]; then
fi
fi
if [[ "${cfg[fde_key_store]}" == "initramfs" ]]; then
if [[ ! -f /boot/volume.key ]] && [[ ! "${cfg[fde_key_store]}" == "twice" ]] && [[ ! "${cfg[fde_key_store]}" == "once" ]]; then
dd bs=1 count=64 if=/dev/urandom of=/boot/volume.key
echo -n "${cfg[diskpw]}" | cryptsetup luksAddKey "${target_partition_tmp}" /boot/volume.key -d -
echo -n "${cfg[diskpw]}" | cryptsetup luksAddKey "${cfg[diskname]}${cfg[target_part]}" /boot/volume.key -d -
chmod 000 /boot/volume.key
chmod -R g-rwx,o-rwx /boot
echo 'install_items+=" /boot/volume.key /etc/crypttab "' > /etc/dracut.conf.d/crypt-ssh.conf
echo "voidluks-${diskid} UUID=${cfg[partuuid]} /boot/volume.key luks" > /etc/crypttab
fi
fi
@ -34,13 +32,11 @@ if [[ "${cfg[hibernate]}" == "1" ]]; then
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"resume=UUID=${cfg[swapuuid]} /" /etc/default/grub
fi
#if [[ "${cfg[fde_key_store]}" == "twice" ]] || [[ "${cfg[fde_key_store]}" == "once" ]]; then
# echo "voidluks-${diskid} UUID=${cfg[partuuid]} none luks" > /etc/crypttab
#fi
if ! grep -q "dark-gray/black" /etc/default/grub; then
echo "GRUB_COLOR_NORMAL=\"dark-gray/black\"" >> /etc/default/grub
echo "GRUB_COLOR_HIGHLIGHT=\"light-red/black\"" >> /etc/default/grub
if [[ "${cfg[fde_key_store]}" == "initramfs" ]]; then
mkdir -p /etc/dracut.conf.d/
echo 'install_items+=" /boot/volume.key /etc/crypttab "' > /etc/dracut.conf.d/crypt-ssh.conf
echo "voidluks-${diskid} UUID=${cfg[partuuid]} /boot/volume.key luks" > /etc/crypttab
fi
module end

View File

@ -0,0 +1,7 @@
module start "bootloader" "Post Bootloader"
grub-install "${cfg[diskname]}"
grub-mkconfig -o /boot/grub/grub.cfg
module end

53
modules/60-de/config Normal file
View File

@ -0,0 +1,53 @@
module "start" "de" "Desktopenvironment Configure"
setconf "add" "gfx_system" "xorg"
multiplechoice "de" "none" "kde5" "i3wm" "gnome" "none"
if [[ ! "${cfg[de]}" == "none" ]]; then
multiplechoice "gfx_hardware" "amd" "nvidia" "intel" "none"
fi
if [[ "${cfg[de]}" == "gnome" ]]; then
setconf add "dm" "gdm"
addpkg "${cfg[dm]}" "gnome" "${gnome_apps}"
elif [[ "${cfg[de]}" == "kde5" ]]; then
setconf add "dm" "sddm"
addpkg "${cfg[dm]}" "kde5" "${kde5_apps}"
elif [[ "${cfg[de]}" == "i3wm" ]]; then
setconf add "dm" "lightdm"
addpkg "lightdm" "lightdm-gtk3-greeter" "i3-gaps" "i3lock-color" "i3status" "xfce4-terminal" "dmenu" "rofi" "pcmanfm" "dunst" "elogind" "gvfs" "gvfs-afc" "gvfs-afp" "gvfs-cdda" "paprefs" "pavucontrol" "gvfs-gphoto2" "gvfs-mtp" "gvfs-smb" "xss-lock" "xbindkeys" "gnome-keyring" "${i3wm_apps}"
fi
if [[ ! "${cfg[de]}" == "none" ]]; then
servicesenable "${cfg[dm]}" "dbus"
addpkg cups cups-filters gutenprint hplip foomatic-db
addpkg "firefox-i18n-de"
addpkg "gajim" "gajim-omemo" "gnome-keyring"
addpkg "aspell-de" "gspell"
addpkg "alsa-utils" alsa-plugins-pulseaudio pulseaudio
addpkg "NetworkManager"
servicesenable "dbus" "NetworkManager" "alsa" "cupsd"
servicesdisable "acpid"
addpkg xorg-minimal xorg-fonts mesa-dri vulkan-loader xorg-apps
ignorepkg "font-adobe-75dpi" "font-adobe-100dpi"
fi
if [[ "${cfg[gfx_hardware]}" == "amd" ]]; then
addpkg mesa-vulkan-radeon xf86-video-amdgpu mesa-vaapi mesa-vdpau
elif [[ "${cfg[gfx_hardware]}" == "intel" ]]; then
addpkg mesa-vulkan-intel xf86-video-intel intel-video-accel
fi
module "end"

View File

@ -11,6 +11,9 @@ fi
if [[ ! "${cfg[de]}" == "none" ]]; then
test -f "${modules}"/"${modulename}".d/install/system/"${cfg[gfx_system]}".mod && source "${modules}"/"${modulename}".d/install/system/"${cfg[gfx_system]}".mod
test -f /etc/locale-user.conf && cp "${dest}"/etc/locale-user.conf "${dest}"/etc/sv/${cfg[dm]}/conf
[[ ! -h /etc/fonts/conf.d/70-no-bitmaps.conf ]] && ln -s /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf "${dest}"/etc/fonts/conf.d/
mkdir -p /etc/X11/xorg.conf.d

View File

@ -3,8 +3,3 @@ declare -f lastminute
if yesno "Lastminute Changes" y; then
lastminute
fi
declare -f os_config
if yesno "O's config?" y; then
os_config
fi

View File

@ -2,51 +2,51 @@ if ! yesno "nun gehts los, sicher?" y; then
exit
fi
module start "disk" "Partition disk . UEFI"
module start "disk" "Partition disk . BIOS"
#umounter "${dest}" || exit
#if [[ ! "${cfg[fde_key_store]}" == "none" ]]; then
# addpkg cryptsetup
#fi
diskid="${cfg[diskid]//-/_}"
index=1
echo "Formatting disk"
echo "g
n
1
+1G
t
1
w
q" | fdisk "${cfg[diskname]}" > /dev/null
efipart="${cfg[diskname]}${index}"
index=$(( index + 1 ))
if [[ -n "${cfg[wipe]}" ]]; then
echo "Formatting disk"
echo "o
w
q" | fdisk "${cfg[diskname]}" > /dev/null
fi
sleep 2
echo "create bootpartition"
target_boot="${cfg[diskname]}${index}"
index=$(( index + 1 ))
target_boot="${cfg[diskname]}1"
echo "n
2
p
1
+${cfg[bootsize]}G
a
w
q" | fdisk "${cfg[diskname]}" > /dev/null
sleep 2
if [[ "${cfg[rootfssize]}" == "rest" ]]; then
target_partition_tmp="${cfg[diskname]}${index}"
target_partition_tmp="${cfg[diskname]}2"
echo "create rootfs"
echo "n
3
p
2
w
q" | fdisk "${cfg[diskname]}" > /dev/null
elif [[ ! "${cfg[rootfssize]}" == "rest" ]]; then
target_partition_tmp="${cfg[diskname]}${index}"
target_partition_tmp="${cfg[diskname]}2"
echo "create rootfs with a specific size"
echo "n
p
3
2
+${rootfssize}G
w
@ -57,46 +57,46 @@ sleep 2
target_partition="${target_partition_tmp}"
if [[ ! "${cfg[fde_key_store]}" == "none" ]]; then
echo -n "${cfg[diskpw]}" | cryptsetup luksFormat --type luks1 "${target_partition}" -d -
sleep 2
sleep 1
echo -n "${cfg[diskpw]}" | cryptsetup luksOpen "${target_partition}" "voidluks-${diskid}" -d -
sleep 2
sleep 1
#echo -n "oem" | cryptsetup luksFormat --type luks1 "${target_partition}" -d -
#echo -n "oem" | cryptsetup luksOpen "${target_partition}" "voidluks-${diskid}" -d -
target_partition="/dev/mapper/voidluks-${diskid}"
fi
mkswap "${target_partition}"
sleep 2
sleep 1
vgcreate -q -f "voidvg.${diskid}" "${target_partition}" || exit 1
sleep 2
sleep 1
lvcreate -q -y --name swap -L "${cfg[swapsize]}"G "voidvg.${diskid}"
sleep 2
sleep 1
lvcreate -q -y --name root -l 100%FREE "voidvg.${diskid}"
sleep 2
sleep 1
mkfs.btrfs -q -f "/dev/mapper/voidvg.${diskid}-root"
mkswap "/dev/mapper/voidvg.${diskid}-swap"
mount "/dev/mapper/voidvg.${diskid}-root" "${dest}"
btrfs subvol create "${dest}/rootfs"
btrfs subvol create "${dest}/homefs"
mkdir -p "${dest}/system/snapshots/update" "${dest}/system/snapshots/regular" "${dest}/system/backup"
umount "${dest}"
mount "/dev/mapper/voidvg.${diskid}-root" "${dest}" -o subvol=rootfs
for i in boot home dev proc sys tmp etc var/lib/backup/quelle/rootfs var/lib/backup/ziel var/db; do mkdir -p "${dest}/${i}"; done
mount "/dev/mapper/voidvg.${diskid}-root" "${dest}"/home -o subvol=homefs
mkdir -p "${dest}/var/lib/backup/quelle/bootfs"
mkfs.btrfs -q -f "${target_boot}"
mount "${target_boot}" "${dest}/boot"
btrfs subvol create "${dest}/boot/bootfs"
mkdir -p "${dest}/boot/system/snapshots/update" "${dest}/boot/system/snapshots/regular" "${dest}/boot/system/backup"
umount "${dest}/boot"
if [[ "${cfg[fde_key_store]}" == "once" ]]; then
mount "${target_boot}" "${dest}/boot" -o subvol=bootfs
fi
mkdir -p "${dest}/boot/efi"
mkfs.vfat -F32 "${efipart}"
mount "${efipart}" "${dest}/boot/efi"
for dir in dev proc sys run; do mkdir -p "${dest}"/$dir ; mount --rbind /$dir "${dest}"/$dir ; mount --make-rslave "${dest}"/$dir ; done

View File

@ -2,14 +2,11 @@ if ! yesno "nun gehts los, sicher?" y; then
exit
fi
module start "disk" "Partition disk . UEFI"
diskid="${cfg[diskid]//-/_}"
index=1
echo "Formatting disk"
if test -d /sys/firmware/efi; then
module start "disk" "Partition disk . UEFI"
if [[ -n "${cfg[wipe]}" ]]; then
echo "Formatting disk"
echo "g
n
1
@ -19,47 +16,33 @@ if test -d /sys/firmware/efi; then
1
w
q" | fdisk "${cfg[diskname]}" > /dev/null
efipart="${cfg[diskname]}${index}"
index=$(( index + 1 ))
else
module start "disk" "Partition disk . BIOS"
echo "o
w
q" | fdisk -w always "${cfg[diskname]}" > /dev/null
fi
sleep 2
echo "create bootpartition"
target_boot="${cfg[diskname]}${index}"
index=$(( index + 1 ))
target_boot="${cfg[diskname]}2"
echo "n
p
1
2
+${cfg[bootsize]}G
a
w
q" | fdisk "${cfg[diskname]}" > /dev/null
sleep 2
if [[ "${cfg[rootfssize]}" == "rest" ]]; then
target_partition_tmp="${cfg[diskname]}${index}"
index=$(( index + 1 ))
target_partition_tmp="${cfg[diskname]}3"
echo "create rootfs"
echo "n
p
2
3
w
q" | fdisk "${cfg[diskname]}" > /dev/null
elif [[ ! "${cfg[rootfssize]}" == "rest" ]]; then
target_partition_tmp="${cfg[diskname]}${index}"
target_partition_tmp="${cfg[diskname]}3"
echo "create rootfs with a specific size"
echo "n
p
2
3
+${rootfssize}G
w
@ -70,54 +53,42 @@ sleep 2
target_partition="${target_partition_tmp}"
if [[ ! "${cfg[fde_key_store]}" == "none" ]]; then
echo -n "${cfg[diskpw]}" | cryptsetup luksFormat --type luks1 "${target_partition}" -d -
sleep 2
sleep 1
echo -n "${cfg[diskpw]}" | cryptsetup luksOpen "${target_partition}" "voidluks-${diskid}" -d -
sleep 2
sleep 1
#echo -n "oem" | cryptsetup luksFormat --type luks1 "${target_partition}" -d -
#echo -n "oem" | cryptsetup luksOpen "${target_partition}" "voidluks-${diskid}" -d -
target_partition="/dev/mapper/voidluks-${diskid}"
fi
mkswap "${target_partition}"
sleep 2
sleep 1
vgcreate -q -f "voidvg.${diskid}" "${target_partition}" || exit 1
sleep 2
sleep 1
lvcreate -q -y --name swap -L "${cfg[swapsize]}"G "voidvg.${diskid}"
sleep 2
sleep 1
lvcreate -q -y --name root -l 100%FREE "voidvg.${diskid}"
sleep 2
sleep 1
mkfs.btrfs -q -f "/dev/mapper/voidvg.${diskid}-root"
mkswap "/dev/mapper/voidvg.${diskid}-swap"
mount "/dev/mapper/voidvg.${diskid}-root" "${dest}"
btrfs subvol create "${dest}/rootfs"
btrfs subvol create "${dest}/homefs"
mkdir -p "${dest}/system/snapshots/update" "${dest}/system/snapshots/regular" "${dest}/system/backup"
umount "${dest}"
umount "${dest}"
mount "/dev/mapper/voidvg.${diskid}-root" "${dest}" -o subvol=rootfs
for i in boot home dev proc sys tmp etc var/lib/backup/quelle/rootfs var/lib/backup/ziel var/db; do mkdir -p "${dest}/${i}"; done
mount "/dev/mapper/voidvg.${diskid}-root" "${dest}"/home -o subvol=homefs
mkdir -p "${dest}/var/lib/backup/quelle/bootfs"
mkfs.btrfs -q -f "${target_boot}"
mount "${target_boot}" "${dest}/boot"
btrfs subvol create "${dest}/boot/bootfs"
mkdir -p "${dest}/boot/system/snapshots/update" "${dest}/boot/system/snapshots/regular" "${dest}/boot/system/backup"
umount "${dest}/boot"
if [[ "${cfg[fde_key_store]}" == "once" ]]; then
mkdir -p "${dest}/var/lib/backup/quelle/bootfs"
mkfs.btrfs -q -f "${target_boot}"
mount "${target_boot}" "${dest}/boot"
btrfs subvol create "${dest}/boot/bootfs"
mkdir -p "${dest}/boot/system/snapshots/update" "${dest}/boot/system/snapshots/regular" "${dest}/boot/system/backup"
umount "${dest}/boot"
mount "${target_boot}" "${dest}/boot" -o subvol=bootfs
fi
if test -d /sys/firmware/efi; then
mkdir -p "${dest}/boot/efi"
mkfs.vfat -F32 "${efipart}"
mount "${efipart}" "${dest}/boot/efi"
fi
for dir in dev proc sys run; do mkdir -p "${dest}"/$dir ; mount --rbind /$dir "${dest}"/$dir ; mount --make-rslave "${dest}"/$dir ; done
setconf add rootuuid "$(blkid -o value -s UUID ${target_partition})"

View File

@ -0,0 +1,8 @@
module "start" "laptop" "Laptopmode Configure"
if yesno "Is this a laptop?" "n"; then
setconf add "laptop" "1"
addpkg laptop-mode
fi
module end

View File

@ -0,0 +1,9 @@
module start "laptop" "Laptopmode Install"
if [[ ! -z "${cfg[laptop]}" ]] && [[ "${cfg[de]}" == "none" ]]; then
echo "${modulename}"
#sed -i "/HandleLidSwitch/s/^#//g" "${dest}/etc/elogind/logind.conf"
#echo sed -i "/HandleLidSwitch/s/^#//g" "${dest}/etc/elogind/logind.conf"
fi
module end

View File

@ -0,0 +1,15 @@
module start "m" "pakete modul"
ignorepkg totem gnome-music htop avahi
addpkg bleachbit thunderbird-i18n-de pidgin pidgin-otr pidgin-gpg pidgin-libnotify gajim gajim-omemo python-Pillow gimp kdenlive VeraCrypt keepassx2 audacity libreoffice libreoffice-i18n-de mumble calibre chromium youtube-dl torbrowser-launcher tor
servicesdisable avahi-daemon
echo "sollte es netflix oder aehnliches gefragt sein, muss 'chromium-widevine' installiert werden"
echo "was meinst du mit festplattenanalyse? restplatzanzeige?"
echo "MAT und torbirdy fehlen noch"
echo "allerdings ist mat hoffnungslos veraltet und mat2 emfpehlen die entwickler nicht, da es beta ist und nicht sicher"
echo "'exiftool' ist da ein terminalprogramm das du dir anguggen solltest"
echo""
echo "verstanden?"
read
module end

View File

@ -1,9 +0,0 @@
networkmanager="dhcpcd"
pkgs="void-repo-multilib void-repo-multilib-nonfree void-repo-nonfree lvm2 cronie socklog-void ntp xtools wireguard-tools gnupg progress pwgen net-tools ncdu nmap mtr bind-utils iotop hdparm smartmontools htop git neovim btrbk croc grub-btrfs nano mbuffer cryptsetup psmisc pinentry-tty"
serviceenable="acpid cronie socklog-unix nanoklogd uuidd agetty-tty1 agetty-tty2 agetty-tty3 agetty-tty4"
servicedisable="agetty-tty6 agetty-tty5"
ignorepkgs="nvi gnupg"

View File

@ -1,14 +0,0 @@
browser="firefox-i18n-de"
networkmanager="NetworkManager"
messenger="gajim-omemo python3-Pillow python3-Pygments"
office="libreoffice-i18n-de"
media="mpv"
spelling="aspell-de gspell"
alsa="alsa-utils alsa-plugins-pulseaudio pulseaudio"
xorg="xorg-minimal xorg-fonts mesa-dri vulkan-loader xorg-apps noto-fonts-emoji"
ignorepkgs="font-adobe-75dpi font-adobe-100dpi"
servicedisable="acpid"
serviceenable="dbus alsa"

View File

@ -1,18 +0,0 @@
email=thunderbird-i18n-de
terminal=gnome-terminal
imageviewer=eog
pdf=evince
filemanager=nautilus
archiver=file-roller
screenshot=gnome-screenshot
calc=gnome-calculator
pinentry=pinentry-gnome
keyring=gnome-keyring
gpg=seahorse
policykit=polkit-gnome
sshaskpass=gnome-ssh-askpass
dm=gdm
de=gnome
misc=""

View File

@ -1,18 +0,0 @@
email=claws-mail
terminal=xfce4-terminal
imageviewer=viewnior
pdf=mupdf
filemanager=pcmanfm
archiver=xarchiver
screenshot=maim
calc=galculator-gtk3
pinentry=pinentry-dmenu
keyring=gnome-keyring
gpg=gnome-keyring
sshaskpass=gnome-ssh-askpass
policykit=polkit-gnome
dm=lightdm
de=i3-gaps
misc="lightdm-gtk3-greeter i3lock-color i3status dmenu elogind dunst gvfs gvfs-afc gvfs-afp gvfs-cdda gvfs-gphoto2 gvfs-mtp gvfs-smb xss-lock paprefs pavucontrol network-manager-applet pamixer"

View File

@ -1,17 +0,0 @@
email=kmail
terminal=konsole
imageviewer=gwenview
pdf=okular
filemanager=dolphin
archiver=ark
screenshot=spectacle
calc=kcalc
pinentry=pinentry-qt
keyring=kwalletmanager
gpg=kleopatra
policykit=polkit-kde-agent
sshaskpass=ksshaskpass
dm=sddm
de=kde5
misc="kdegraphics-thumbnailers ffmpegthumbs print-manager plasma-browser-integration"

View File

@ -1,3 +0,0 @@
printing="cups cups-filters gutenprint foomatic-db"
serviceenable="cupsd"

View File

@ -1,8 +1,11 @@
#!/bin/bash
dir="/tmp/installer"
step="${dir}/step"
wrksrc="${dir}"/tmp
functions="${dir}/functions"
modules="${dir}/modules"
config_mods="${modules}/config"
install_mods="${modules}/install"
chroot_mods="${modules}/chroot"
FILESDIR="${dir}/files"
vars="${wrksrc}/vars"
@ -27,11 +30,11 @@ for i in $(seq 0 "$(( max - 1 ))"); do
done
export run="install"
for i in $(find "${step}3" -mindepth 1 -maxdepth 1 -type f | sort -n ); do
test -f "${i}" && source "${i}"
for i in $(find "${modules}" -mindepth 1 -maxdepth 1 -type d | sort -n ); do
test -f "${i}"/install && source "${i}"/install
done
export run="post"
for i in $(find "${step}4" -mindepth 1 -maxdepth 1 -type f | sort -n); do
test -f "${i}" && source "${i}"
for i in $(find "${modules}" -mindepth 1 -maxdepth 1 -type d | sort -n); do
test -f "${i}"/post && source "${i}"/post
done

View File

@ -1,7 +0,0 @@
if test -d /sys/firmware/efi; then
addpkg "grub-x86_64-efi"
else
addpkg "grub"
fi

View File

@ -1,51 +0,0 @@
while input "hostname?" "void"; do
if check alnum "${output}"; then
setconf add hostname "${output}"
break
fi
done
setconf add "lang" "de_DE"
setconf add "lang_console" "de-latin1-nodeadkeys"
setconf add "timezone" "Europe/Berlin"
setconf "add" "gfx_system" "xorg"
for i in $(find "${dir}/profiles/desktops" -type f); do
des+=( "$(basename $i)" )
done
multiplechoice "de" "none" "${des[@]}"
if [[ ! "${cfg[de]}" == "none" ]]; then
multiplechoice "gfx_hardware" "amd" "nvidia" "intel" "none"
if [[ "${cfg[gfx_hardware]}" == "amd" ]]; then
addpkg mesa-vulkan-radeon xf86-video-amdgpu mesa-vaapi mesa-vdpau
elif [[ "${cfg[gfx_hardware]}" == "intel" ]]; then
addpkg mesa-vulkan-intel xf86-video-intel intel-video-accel
fi
fi
if yesno "Printing enabled?" "y"; then
source "${dir}/profiles/printing"
addpkg "${printing}"
servicesenable "${enable_service}"
fi
source "${dir}/profiles/basesystem"
servicesenable "${serviceenable}"
servicesdisable "${servicedisable}"
addpkg "${pkgs}"
ignorepkg "${ignorepkgs}"
if [[ ! "${cfg[de]}" == "none" ]]; then
source "${dir}/profiles/desktop"
servicesenable "${serviceenable}"
servicesdisable "${servicedisable}"
ignorepkg "${ignorepkgs}"
source "${dir}/profiles/desktops/${cfg[de]}"
servicesenable "${dm}"
addpkg "${spelling}" "${alsa}" "${xorg}" "${browser}" "${mail}" "${messenger}" "${terminal}" "${imageviewer}" "${pdf}" "${filemanager}" "${archiver}" "${screenshot}" "${calc}" "${pinentry}" "${keyring}" "${gpg}" "${policykit}" "${sshaskpass}" "${office}" "${dm}" "${de}" "${networkmanager}"
fi
servicesenable "{$networkmanager}"

View File

@ -1,169 +0,0 @@
if ! yesno "nun gehts los, sicher?" y; then
exit
fi
module start "disk" "Partition disk"
sleep=4
diskid="${cfg[diskid]//-/_}"
dodiskid="/dev/disk/by-id/${cfg[diskid]}"
index=1
echo "Formatting disk"
if test -d /sys/firmware/efi; then
echo "UEFI Partition"
(echo "g";
echo "n";
echo "1";
echo "";
echo "+1G";
echo "t";
echo "1";
sleep $sleep;
echo "w") | fdisk "${dodiskid}" > /dev/null
sleep $sleep
efipart="${dodiskid}-part${index}"
index=$(( index + 1 ))
else
echo "BIOS Partition"
(echo "o";
sleep $sleep;
echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null
fi
sleep $sleep
sync
echo "create bootpartition"
target_boot="${dodiskid}-part${index}"
index=$(( index + 1 ))
if test -d /sys/firmware/efi; then
(echo "n";
echo "";
echo "";
echo "+4G";
sleep $sleep;
echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null
else
(echo "n";
echo "p";
echo "1";
echo "";
echo "+4G";
echo "a";
sleep $sleep;
echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null
fi
sleep $sleep
if [[ "${cfg[rootfssize]}" == "rest" ]]; then
target_partition_tmp="${dodiskid}-part${index}"
echo "create rootfs"
if test -d /sys/firmware/efi; then
(echo "n";
echo "";
echo "";
echo "";
sleep $sleep;
echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null
else
(echo "n";
echo "p";
echo "2";
echo "";
echo "";
sleep $sleep;
echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null
fi
elif [[ ! "${cfg[rootfssize]}" == "rest" ]]; then
target_partition_tmp="${dodiskid}-part${index}"
echo "create rootfs with a specific size"
if test -d /sys/firmware/efi; then
(echo "n";
echo "";
echo "";
echo "+${rootfssize}G";
sleep $sleep;
echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null
else
(echo "n";
echo "p";
echo "2";
echo "";
echo "+${rootfssize}G";
sleep $sleep;
echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null
fi
fi
sleep $sleep
target_partition="${target_partition_tmp}"
if [[ ! "${cfg[fde_key_store]}" == "none" ]]; then
echo -n "${cfg[diskpw]}" | cryptsetup luksFormat --type luks1 "${target_partition}" -d -
sleep $sleep
sync
echo -n "${cfg[diskpw]}" | cryptsetup luksOpen "${target_partition}" "voidluks-${diskid}" -d -
sleep $sleep
sync
#echo -n "oem" | cryptsetup luksFormat --type luks1 "${target_partition}" -d -
#echo -n "oem" | cryptsetup luksOpen "${target_partition}" "voidluks-${diskid}" -d -
target_partition="/dev/mapper/voidluks-${diskid}"
fi
mkswap "${target_partition}" || exit 1
sleep $sleep
sync
vgcreate -q -f "voidvg.${diskid}" "${target_partition}" || exit 1
sleep $sleep
sync
lvcreate -q -y --name swap -L "${cfg[swapsize]}"G "voidvg.${diskid}" || exit 1
sleep $sleep
sync
lvcreate -q -y --name root -l 100%FREE "voidvg.${diskid}" || exit 1
sleep $sleep
sync
mkfs.btrfs -q -f "/dev/mapper/voidvg.${diskid}-root" || exit 1
mkswap "/dev/mapper/voidvg.${diskid}-swap" || exit 1
mount "/dev/mapper/voidvg.${diskid}-root" "${dest}" || exit 1
btrfs subvol create "${dest}/rootfs"
btrfs subvol create "${dest}/homefs"
mkdir -p "${dest}/system/snapshots/update" "${dest}/system/snapshots/regular" "${dest}/system/backup"
umount "${dest}"
mount "/dev/mapper/voidvg.${diskid}-root" "${dest}" -o subvol=rootfs
for i in boot home dev proc sys tmp etc var/lib/backup/quelle/rootfs var/lib/backup/ziel var/db; do mkdir -p "${dest}/${i}"; done
mount "/dev/mapper/voidvg.${diskid}-root" "${dest}"/home -o subvol=homefs
mkdir -p "${dest}/var/lib/backup/quelle/bootfs"
mkfs.btrfs -q -f "${target_boot}"
mount "${target_boot}" "${dest}/boot"
btrfs subvol create "${dest}/boot/bootfs"
mkdir -p "${dest}/boot/system/snapshots/update" "${dest}/boot/system/snapshots/regular" "${dest}/boot/system/backup"
umount "${dest}/boot"
if [[ "${cfg[fde_key_store]}" == "once" ]]; then
mount "${target_boot}" "${dest}/boot" -o subvol=bootfs
fi
if test -d /sys/firmware/efi; then
mkdir -p "${dest}/boot/efi"
mkfs.vfat "${efipart}"
sleep $sleep
mount "${efipart}" "${dest}/boot/efi"
fi
for dir in dev proc sys run; do mkdir -p "${dest}"/$dir ; mount --rbind /$dir "${dest}"/$dir ; mount --make-rslave "${dest}"/$dir ; done
setconf add partuuid "$(blkid -o value -s UUID ${target_partition_tmp})"
setconf add efiuuid "$(blkid -o value -s UUID ${efipart})"
[[ "${cfg[fde_key_store]}" == "once" ]] && setconf "add" "bootuuid" "$(blkid -o value -s UUID ${target_boot})"
setconf add swapuuid "$(blkid -o value -s UUID /dev/mapper/voidvg.${diskid}-swap)"
mount -t tmpfs -o size=512m tmpfs "${dest}"/tmp
module end

View File

@ -1,11 +0,0 @@
module start "bootloader" "Post Bootloader"
if test -d /sys/firmware/efi; then
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id="Void"
else
grub-install "${cfg[diskname]}"
fi
grub-mkconfig -o /boot/grub/grub.cfg
module end