-
Notifications
You must be signed in to change notification settings - Fork 1
/
config-xfce
89 lines (80 loc) · 2.75 KB
/
config-xfce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
ISO_ARCH=x86_64
pre_build() {
# add custom/rootoverlay to airootfs
cp -rvT /custom/rootoverlay airootfs
[ -d "/custom/rootoverlays/$LIVECD_PROFILE" ] && cp -rvT "/custom/rootoverlays/$LIVECD_PROFILE" airootfs
# grub: no beep
sed -i '/^# GRUB init tune for accessibility$/,/^$/s/^play/# play/g' grub/grub.cfg
# sdboot: no beep
sed -i 's/beep on/beep off/g' efiboot/loader/loader.conf
# add archiso_pxe_dns to mkinitcpio.conf
sed -i 's/archiso_pxe_common/archiso_pxe_dns archiso_pxe_common/g' airootfs/etc/mkinitcpio.conf.d/archiso.conf
# add ntfs-3g to mkinitcpio.conf
echo >> airootfs/etc/mkinitcpio.conf.d/archiso.conf
echo 'BINARIES+=(mount.ntfs)' >> airootfs/etc/mkinitcpio.conf.d/archiso.conf
# add rndis_host to mkinitcpio.conf
echo 'MODULES+=(rndis_host)' >> airootfs/etc/mkinitcpio.conf.d/archiso.conf
# no customize_airootfs.sh? no problem
mkdir -p airootfs/etc/pacman.d/hooks
cat << EOF > airootfs/etc/pacman.d/hooks/zzzz98-customize-airootfs.hook
# remove from airootfs!
[Trigger]
Operation = Install
Type = Package
Target = networkmanager
[Action]
Description = Running customize-airootfs...
When = PostTransaction
Exec = /bin/sh -c "systemctl enable NetworkManager lightdm && \
systemctl disable sshd iwd reflector systemd-networkd systemd-networkd.socket systemd-resolved && \
systemctl set-default graphical.target && \
sed -i 's/^\(PermitRootLogin\) yes$/\1 prohibit-password/' /etc/ssh/sshd_config.d/10-archiso.conf && \
groupadd -r autologin && \
useradd -m -G autologin,wheel -g users -s /usr/bin/zsh archiso && \
echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
echo -e 'archiso\narchiso' | passwd archiso && \
passwd -d root && \
rm -fv /etc/lightdm/lightdm.conf.pacnew && \
rm -fv /etc/resolv.conf && \
touch /etc/resolv.conf && \
true"
EOF
# lightdm.conf
mkdir -p airootfs/etc/lightdm
cat << EOF > airootfs/etc/lightdm/lightdm.conf
[LightDM]
run-directory=/run/lightdm
[Seat:*]
session-wrapper=/etc/lightdm/Xsession
autologin-user=archiso
autologin-user-timeout=1
autologin-session=xfce
EOF
# pkglist check
compatver=v81
compatlink="https://gitlab.archlinux.org/archlinux/archiso/-/blob/${compatver}/configs/releng/packages.x86_64"
compatraw="https://gitlab.archlinux.org/archlinux/archiso/-/raw/${compatver}/configs/releng/packages.x86_64"
curl -L -o packages.x86_64.compat "$compatraw"
diff packages.x86_64 packages.x86_64.compat
rm packages.x86_64.compat
# alter packages
cat << EOF >> packages.x86_64
nano
bash-completion
xorg-server
nvidia
mesa
virtualbox-guest-utils
xfce4
lightdm
lightdm-gtk-greeter
networkmanager
network-manager-applet
nm-connection-editor
firefox
gparted
EOF
cat << EOF > packages.x86_64.remove
virtualbox-guest-utils-nox
EOF
}