Bootstrap: add bootstrapping scripts.

This commit is contained in:
Érico Rolim 2020-06-25 04:26:54 -03:00
parent d0444f28f9
commit 7ee3b51e5a
14 changed files with 66 additions and 7 deletions

22
void/bootstrap.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/sh
: ${XBPS_ARCH:=x86_64-musl}
: ${ROOTDIR:=/mnt}
export XBPS_ARCH
export ROOTDIR
BOOTSTRAP=1 ./void.sh ${COLLECTIONS:-current_system}
void.d/system/transfer-install.sh
void.d/system/apparmor.sh
void.d/system/intel.sh
void.d/system/nvidia.sh
void.d/system/service-and-tz.sh
void.d/system/zfs.sh
: ${HOSTNAME:=ericonr}
echo $HOSTNAME > $ROOTDIR/hostname
cp void.d/system/chroot.sh $ROOTDIR/
xchroot $ROOTDIR /chroot.sh
rm $ROOTDIR/chroot.sh

View File

@ -0,0 +1,2 @@
owner @{HOME}/docs/dotfiles/wayland/.config/mako/config r,
/usr/share/** r,

View File

@ -0,0 +1 @@
# Site-specific additions and overrides for 'usr.bin.redshift'

View File

@ -0,0 +1,7 @@
# AppArmor configuration
# Possible options:
# - disable
# - complain
# - enforce
APPARMOR=enforce

View File

@ -0,0 +1 @@
omit_drivers+=" nouveau nvidia "

View File

@ -1,2 +1 @@
omit_drivers+=" nouveau nvidia "
kernel_cmdline+=" i915.enable_guc=2 intel_iommu=igfx_off "

View File

@ -1 +1 @@
spl_hostid=0e2e6746 ro quiet i195.enable_guc=2 apparmor=1 security=apparmor
spl_hostid=0e2e6746 ro quiet i915.enable_guc=2 apparmor=1 security=apparmor

4
void/void.d/system/apparmor.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
cp etc-x86/default/apparmor $ROOTDIR/etc/default/
cp etc-x86/apparmor.d/local/* $ROOTDIR/etc/apparmor.d/local/

7
void/void.d/system/chroot.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
xbps-reconfigure -fa
useradd -G wheel,video,kvm,xbuilder ericonr
chsh ericonr -s /usr/bin/fish
passwd ericonr

View File

@ -1,7 +1,4 @@
#!/bin/sh
MOUNTDIR=$1
cp etc-x86/intel-undervolt.conf "$MOUNTDIR/etc"
echo "intel-undervolt apply" >> "$MOUNTDIR/etc/rc.local"
cp etc-x86/intel-undervolt.conf "$ROOTDIR/etc"
echo "intel-undervolt apply" >> "$ROOTDIR/etc/rc.local"

3
void/void.d/system/nvidia.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cp etc-x86/dracut.conf.d/30-nvidia.conf $ROOTDIR/etc/dracut.conf.d/

View File

@ -0,0 +1,13 @@
#!/bin/sh
: ${ROOTDIR:=/mnt}
copy() {
[ -e /$1 ] && cp -a /$1 $ROOTDIR/$1
}
copy etc/hostid
copy etc/zfsbootmenu
copy etc/zfs/zroot.key
copy etc/fstab
copy usr/share/secureboot

3
void/void.d/system/zfs.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cp etc-x86/dracut.conf.d/20-zol.conf $ROOTDIR/etc/dracut.conf.d/