-
Notifications
You must be signed in to change notification settings - Fork 0
/
arch-graphical-install-auto.sh
executable file
·780 lines (623 loc) · 21.8 KB
/
arch-graphical-install-auto.sh
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
#!/usr/bin/env bash
#
set -ex
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
sudo "${0}" "$@"
exit 0
fi
echo "Als root Angemeldet"
RCLOCAL='/etc/rc.local'
RCLOCALSHUTDOWN='/etc/rc.local.shutdown'
SYSCTL='/etc/sysctl.conf'
SUDOERS="/etc/sudoers"
autostartdesktop=sway
repo=SpectreOS
repo1=shell-scripte-code
hostname=$(cat /etc/hostname)
user=user1
userpass=user1
arch=$(uname -m)
branch=master
offline=false
# Lese die Umgebungsvariablen neu
source /etc/environment
# while-schleife
while (( "$#" ))
do
echo ${1}
export ${1}="y"
shift
done
if cat /etc/passwd | grep "x:1000" > /dev/null; then
tempuser=$(cat /etc/passwd | grep "x:1000" | awk '{print $1}')
user=${tempuser%%:*}
#else
# user=$(whoami)
fi
function pacmanconf() {
cp -v /opt/${repo}/mirrorlist* /etc/pacman.d/
cp -v /opt/${repo}/pacman.conf /etc/pacman.conf
pacman-key --init
pacman-key --populate archlinux
pacman -Syu git glibc --needed --noconfirm
}
function gitclone() {
git config --global credential.helper store
git config --global core.editor "vim"
git config --global user.email "[email protected]"
git config --global user.name "user"
git config --global push.default simple
git config --global pull.rebase true
git config --global merge.tool vimdiff
git config --global --add safe.directory '*'
# Aktualisiere die Repositiories
# Überprüfe ob das GIT Repo überhaupt vorhanden ist, sonst verwende das Failback
if [ -f "/opt/${repo}/repo.sh" ]; then /opt/${repo}/repo.sh; else /usr/bin/repo; fi
# Lese die Umgebungsvariablen neu
source /etc/environment
if [ "${offline}" != "true" ]; then
if [ -d "/opt/${repo}" ]; then
echo "${repo} existiert bereits!!!"
cd /opt/${repo}
git checkout ${branch}
if ! git remote set-url origin ${WEBADDRESS_OS}; then
git remote add origin ${WEBADDRESS_OS}
fi
git pull
else
git clone -b ${branch} ${WEBADDRESS_OS} /opt/${repo}
fi
if [ -d "/opt/${repo1}" ]; then
echo "${repo1} existiert bereits!!!"
cd /opt/${repo1}
if ! git remote set-url origin ${WEBADDRESS_SCRIPTE}; then
git remote add origin ${WEBADDRESS_SCRIPTE}
fi
git pull
else
git clone ${WEBADDRESS_SCRIPTE} /opt/${repo1}
fi
fi
cd /
}
function standartinstallation() {
if ! pacman -Syu $(cat /opt/${repo}/packages.txt) --needed --noconfirm; then
echo "Konnte Aktualisierung nicht abschließen!!!"
echo "Versuche die Packete automatisch zu aktualisieren!!!"
sleep 5
fi
}
function addusers() {
# Erstelle Gruppen
groupid=1000
for wort in ${user} users wheel audio input power storage video sys optical adm lp scanner sddm kvm fuse autologin network wireshark docker libvirt libvirtdbus flatpak seat nix-users; do
if ! cat /etc/group | grep ${wort}; then
while cat /etc/group | grep ${groupid}; do
groupid=$((${groupid} + 1))
done
groupadd ${wort} -g ${groupid}
fi
done
useruid=1000
while cat /etc/passwd | grep ${useruid}; do
useruid=$((${useruid} + 1))
done
useradd -m -g ${user} -G users,wheel,audio,input,power,storage,video,sys,optical,adm,lp,scanner,sddm,kvm,fuse,autologin,network,wireshark,docker,libvirt,libvirtdbus,flatpak,seat,nix-users -s /usr/bin/zsh --uid ${useruid} ${user}
echo "${user}:${userpass}" | chpasswd
mkdir -p /home/${user}/
userrechte
}
function add_plymouth() {
cd /opt/
if [ "${version%-*-*}" != "lite" ] && [ "${skip}" != "skip" ] && ! [ "${version#*-}" == "cli" ]; then
aurinstaller "https://aur.archlinux.org/plymouth.git"
aurinstaller "https://aur.archlinux.org/plymouth-theme-dark-arch.git"
plymouth-set-default-theme -R dark-arch
fi
if ! [ -d plymouth-bgrt ]; then
if git clone https://github.com/darac/plymouth-bgrt.git; then
cd plymouth-bgrt
if ./install.sh; then
plymouth-set-default-theme -R plymouth-bgrt
else
echo "Konnte das Bootlogo nicht finden!!!"
fi
echo "Git erfolgreich runtergeladen ;-D"
else
echo "Konnte Git nicht herunterladen!!!"
fi
else
cd plymouth-bgrt
update_git
fi
cd /
}
function userrechte() {
#user
chown -cR "$user":"$user" /home/"$user"
#chmod 750 -R /home/"$user"
#ssh
if ! [ -d /home/"$user"/.ssh ]; then
mkdir -p /home/"$user"/.ssh
fi
chmod 700 /home/"$user"/.ssh
if [ -f /home/"$user"/.ssh/config ]; then
chmod 400 /home/${user}/.ssh/config
fi
if [ -f /home/"$user"/.ssh/id_rsa ]; then
chmod 600 /home/"$user"/.ssh/id_rsa
fi
if ! [ -f /home/"$user"/.ssh/authorized_keys ]; then
touch /home/"$user"/.ssh/authorized_keys
fi
chmod 600 /home/"$user"/.ssh/authorized_keys
#gnupg
mkdir -p /home/"$user"/.gnupg
chmod -R 700 /home/"$user"/.gnupg
chown -cRv "$user":"$user" /home/${user}/.gnupg
if [ -f /home/${user}/.gnupg/* ]; then
chmod -v 600 /home/${user}/.gnupg/*
fi
}
function links() {
#
mkdir -p /home/"$user"/Schreibtisch/
if [ -f "/usr/share/applications/arch-install.desktop" ]; then
if [ -f "/home/"$user"/Schreibtisch/arch-install.desktop" ]; then
echo "datei existiert bereits!"
else
ln -s /usr/share/applications/arch-install.desktop /home/"$user"/Schreibtisch/arch-install.desktop
fi
#chmod +x /home/"$user"/Schreibtisch/arch-install.desktop
fi
mkdir -p /home/"$user"/Desktop/
if [ -f "/usr/share/applications/arch-install.desktop" ]; then
if [ -f "/home/"$user"/Desktop/arch-install.desktop" ]; then
echo "datei existiert bereits!"
else
ln -s /usr/share/applications/arch-install.desktop /home/"$user"/Desktop/arch-install.desktop
fi
#chmod +x /home/"$user"/Desktop/arch-install.desktop
fi
}
function add_locale_settings() {
# set systemconfiguration
echo "LANG=de_DE.UTF-8" > /etc/locale.conf
echo "LC_COLLATE=C" >> /etc/locale.conf
echo "LANGUAGE=de_DE" >> /etc/locale.conf
echo "de_DE.UTF-8 UTF-8" > /etc/locale.gen
echo "de_DE ISO-8859-1" >> /etc/locale.gen
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "KEYMAP=de" > /etc/vconsole.conf
echo "FONT=lat9w-16" >> /etc/vconsole.conf
if [ -f "/etc/conf.d/keymaps" ]; then
sed -i 's/keymap=.*$/keymap=\"de\"/' /etc/conf.d/keymaps
fi
sed -e 's|Option "XkbLayout".*$|Option "XkbLayout" "de"|' -i /etc/X11/xorg.conf.d/20-keyboard.conf
if [ "$keytable_short" != "de" ]; then
sed -e 's| xkb_layout.*$| xkb_layout de|' -i /home/${user}/.config/sway/config
fi
# https://stackoverflow.com/questions/5767062/how-to-check-if-a-symlink-exists
if [ -L /etc/localtime ]; then
rm /etc/localtime
fi
ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
}
function update_git() {
git reset --hard
if ! git pull; then
echo "Konnte die Git-Repository nicht aktualisieren!!!"
fi
}
# Lade wichtige Git-Repositorys herunter
gitclone
# Konfiguriere die Repositoryverwaltung Pacman
pacmanconf
if [ "$1" == "adduser" ]; then
user="$2"
userpass="$3"
if cat /etc/passwd | grep "x:1000" > /dev/null; then
echo "${user} existiert bereits!!!"
else
addusers
fi
exit 0
elif [ "$1" == "add_plymouth" ]; then
add_plymouth
exit 0
elif [ "$1" == "userrechte" ]; then
userrechte
exit 0
fi
if cat /etc/passwd | grep ${user} > /dev/null; then
echo "${user} existiert bereits!!!"
else
addusers
fi
if [ "$erstellen" == "exit" ]
then
exit 0
fi
# grundinstallation
echo "root:root" | chpasswd
# sudoers/wheel
echo "Lege $SUDOERS neu an!!!"
echo "root ALL=(ALL) NOPASSWD: ALL" > $SUDOERS
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> $SUDOERS
#echo "%master ALL=(ALL) NOPASSWD: ALL" >> $SUDOERS
# Setze die die UIDs und GIDs standartmässig auf 2000 bei der erstellung von neuen Benutzern und Gruppen
#sed -i 's/^UID_MIN.*$/UID_MIN 2000/' /etc/login.defs
#sed -i 's/^GID_MIN.*$/GID_MIN 2000/' /etc/login.defs
# systemaktualisierung
standartinstallation
echo "Packetliste2 Ende"
echo "Beginne mit dem Konfigurieren des Systems :D"
# import compress script
# compress-script
cp /opt/${repo}/scripts/compress.sh /usr/bin/compress
chmod 755 /usr/bin/compress
cp /opt/${repo}/scripts/compress-pigz.sh /usr/bin/compress-pigz
chmod 755 /usr/bin/compress-pigz
# pinentray wayland
cp /opt/${repo}/scripts/pinentry-wayland /usr/bin/pinentry-wayland
chmod 755 /usr/bin/pinentry-wayland
# set system startup files
echo "System startup files"
cp -v /opt/${repo}/service/* /etc/systemd/system/
systemctl enable acpid
systemctl enable ntpd
systemctl enable avahi-daemon
systemctl enable cups
systemctl enable sshd
systemctl enable cronie
systemctl enable systemd-timesyncd.service
# systemd-resolved is a systemd service that provides network name resolution to local applications via a D-Bus interface
systemctl enable systemd-resolved.service
# systemctl disable docker
# systemctl disable x11vnc
#systemctl enable mpd
#systemctl enable [email protected]
echo "Bitte OpenVPN config in die /etc/openvpn/client/client.conf kopieren!!!"
if [ -f /lib/systemd/system/[email protected] ]; then
echo "link vorhanden!"
else
ln /lib/systemd/system/[email protected] /lib/systemd/system/[email protected]
fi
#Bei ausdokumentierung wird eine/die VPN automatisch aus der /etc/openvpn/client/client.conf gestartet!!!
#systemctl enable [email protected]
#systemctl enable [email protected]
systemctl enable fail2ban
systemctl enable NetworkManager.service
systemctl enable bluetooth.service
#systemctl enable httpd
#systemctl enable sddm
systemctl enable seatd
# https://wiki.archlinux.org/title/CPU_frequency_scaling
systemctl enable power-profiles-daemon
# systemctl enable nix-daemon.service
#add_plymouth
#mkdir -p /etc/systemd/system/getty\@tty1.service.d/
#echo "[Service]" > /etc/systemd/system/getty\@tty1.service.d/autologin.conf
#echo "ExecStart=" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
#echo "ExecStart=-/usr/bin/agetty --autologin ${user} -s %I 115200,38400,9600 vt102" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
# iso_name
echo "${hostname}" > /etc/hostname
echo "hostname=\"${hostname}\"" > /etc/conf.d/hostname
# uefi-boot
cp /opt/${repo1}/uefi-boot.sh /usr/bin/uefi-boot
chmod 755 /usr/bin/uefi-boot
# youtube
cp /opt/${repo1}/youtube.sh /usr/bin/youtube-downloader
chmod 755 /usr/bin/youtube-downloader
# write-partitions manager
cp /opt/${repo}/scripts/write_cowspace /usr/bin/write_cowspace
chmod 755 /usr/bin/write_cowspace
# installer-/usr/bin/
cp /opt/${repo}/arch-install.sh /usr/bin/arch-install
chmod 755 /usr/bin/arch-install
if ! grep 'TERMINAL' /etc/environment; then
echo "TERMINAL=wezterm" >> /etc/environment
fi
if ! grep 'EDITOR' /etc/environment; then
echo "EDITOR=vim" >> /etc/environment
fi
if ! grep 'QT_QPA_PLATFORMTHEME' /etc/environment; then
echo "QT_QPA_PLATFORMTHEME=qt6ct" >> /etc/environment
fi
# /etc/arch-release
echo "OS=${repo}" > /etc/arch-release
# tablet-onboard
cp /opt/${repo}/scripts/tablet-onboard.sh /usr/bin/tablet-onboard
chmod +x /usr/bin/tablet-onboard
# bash.bashrc
sed "s|%OS_NAME%|${repo}|g;" /opt/${repo}/configs/bash.bashrc > /etc/bash.bashrc
cp /opt/${repo}/service/btrfs-swapon.service /etc/systemd/system/
# btrfs-swapfile
cp /opt/${repo}/scripts/btrfs-swapon /usr/bin/
chmod 755 /usr/bin/btrfs-swapon
cp /opt/${repo}/scripts/btrfs-swapoff /usr/bin/
chmod 755 /usr/bin/btrfs-swapoff
# ssh
cp /opt/${repo}/configs/sshd_config /etc/ssh/sshd_config
# snapshot.sh
cp /opt/${repo}/scripts/snapshot.sh /usr/bin/snapshot
chmod 755 /usr/bin/snapshot
# update-script
cp /opt/${repo}/scripts/update.sh /usr/bin/update-script
chmod 755 /usr/bin/update-script
# Verzeichnisse
mkdir -p /home/${user}/Dokumente
mkdir -p /home/${user}/Bilder
mkdir -p /home/${user}/Musik
mkdir -p /home/${user}/Downloads
mkdir -p /home/${user}/Videos
mkdir -p /home/${user}/Desktop
mkdir -p /home/${user}/Public
mkdir -p /home/${user}/Templates
# addusers.sh
cp /opt/${repo}/scripts/addusers.sh /usr/bin/addusers
chmod 755 /usr/bin/addusers
# set default shell
chsh -s /usr/bin/zsh root
chsh -s /usr/bin/zsh ${user}
# aurinstaller
cp /opt/${repo}/scripts/aurinstall.sh /usr/bin/aurinstaller
chmod +x /usr/bin/aurinstaller
cp /opt/${repo}/scripts/aurupdater.sh /usr/bin/aurupdater
chmod +x /usr/bin/aurupdater
# setcap-ping
setcap cap_net_raw+ep /bin/ping
# gpg pinentry
mkdir -p /home/${user}/.gnupg/
cp /opt/${repo}/scripts/pinentry-wayland /usr/bin/
# installer
mkdir -p /usr/share/applications/
cp /opt/${repo}/desktop/arch-install.desktop /usr/share/applications/arch-install.desktop
# install-picture
mkdir -p /usr/share/pixmaps/
cp /opt/${repo}/desktop/install.png /usr/share/pixmaps/
# grub_background
mkdir -p /usr/share/grub/
cp /opt/${repo}/grub/grub_background.png /usr/share/grub/background.png
# bluetooth-network-polkit
mkdir -p /etc/polkit-1/rules.d/
cp /opt/${repo}/polkit/51-blueman.rules /etc/polkit-1/rules.d/51-blueman.rules
cp /opt/${repo}/polkit/50-org.freedesktop.NetworkManager.rules /etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules
# os-release
cp /opt/${repo}/os-release /etc/
# lsb-release
#cp /opt/${repo}/lsb-release /etc/
# autodiskmount
mkdir -p /media/
mkdir -p /etc/udev/rules.d/
# touchpad
#cp /opt/${repo}/01-touchpad.rules /etc/udev/rules.d/01-touchpad.rules
cp /opt/${repo}/scripts/mouse-pnp-event-handler.sh /usr/bin/mouse-pnp-event-handler.sh
chmod +x /usr/bin/mouse-pnp-event-handler.sh
cp /opt/${repo}/scripts/touchpad_toggle.sh /usr/bin/touchpad_toggle
chmod +x /usr/bin/touchpad_toggle
# hardreset
cp /opt/${repo}/scripts/hardreset.sh /usr/bin/hardreset.sh
chmod +x /usr/bin/hardreset.sh
# slowtype
cp /opt/${repo}/scripts/slowtype /usr/bin/slowtype
chmod +x /usr/bin/slowtype
# clipboard wrapper
cp -v /opt/${repo}/scripts/clipboard_wrapper/* /usr/bin/
# Convert commands (vim)
cp -v /opt/${repo}/scripts/csv2tsv /usr/bin/
cp -v /opt/${repo}/scripts/tsv2csv /usr/bin/
# cpu_gpu sensors
mkdir -p /etc/conf.d
cp /opt/${repo}/scripts/lm_sensors /etc/conf.d/lm_sensors
# wacom stylus-support
cp /opt/${repo}/configs/10-wacom.rules /etc/udev/rules.d/10-wacom.rules
cp /usr/share/X11/xorg.conf.d/70-wacom.conf /etc/X11/xorg.conf.d/
# zramctrl
cp /opt/${repo}/scripts/zramctrl /usr/bin/zramctrl
cp /opt/${repo}/service/zramswap.service /etc/systemd/system/zramswap.service
systemctl enable zramswap
# hooks
cp -v /opt/${repo}/configs/install/* /usr/lib/initcpio/install/
cp -v /opt/${repo}/configs/hooks/* /usr/lib/initcpio/hooks/
cp -v /opt/${repo}/configs/script-hooks/* /usr/lib/initcpio/
mkdir -p /etc/pacman.d/hooks
cp -v /opt/${repo}/configs/pacman-hooks/* /etc/pacman.d/hooks/
cp -v /opt/${repo}/make-packages-txt.sh /usr/bin/make-packages-txt.sh
chmod +x /usr/bin/make-packages-txt.sh
# nano
echo "include "/usr/share/nano/*.nanorc"" > /etc/nanorc
# Install rc.local
echo "[Unit]
Description=/etc/rc.local compatibility
[Service]
Type=oneshot
ExecStart=/etc/rc.local
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/rc-local.service
touch $RCLOCAL
chmod +x $RCLOCAL
systemctl enable rc-local.service
if ! grep '#!' $RCLOCAL; then
echo "#!/bin/bash" > $RCLOCAL
fi
if ! grep 'setcap cap_net_raw+ep /bin/ping' $RCLOCAL; then
echo "setcap cap_net_raw+ep /bin/ping" >> $RCLOCAL
fi
# Install rc.shutdown
echo "[Unit]
Description=/etc/rc.local.shutdown Compatibility
ConditionFileIsExecutable=/etc/rc.local.shutdown
DefaultDependencies=no
After=basic.target
Before=shutdown.target
[Service]
Type=oneshot
ExecStart=/etc/rc.local.shutdown
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/rc-local-shutdown.service
touch $RCLOCALSHUTDOWN
chmod +x $RCLOCALSHUTDOWN
systemctl enable rc-local-shutdown.service
if ! grep '#!' $RCLOCALSHUTDOWN; then
echo "#!/bin/bash" > $RCLOCALSHUTDOWN
fi
# set desktop
echo "set desktop"
#
mkdir -p /etc/X11/xinit/
echo "Systemsprache und dienste werden erstellt!"
mkdir -p /etc/X11/xorg.conf.d/
cp -R /opt/${repo}/configs/xorg.conf.d/* /etc/X11/xorg.conf.d/
if ! [ -f "/etc/X11/xorg.conf.d/40-libinput.conf" ]; then
ln -s /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if ! [ -f "/usr/bin/l" ]; then
ln -s /usr/bin/ls /usr/bin/l
fi
su ${user} -l -c "chezmoi init -v --apply --force https://code.brothertec.eu/simono41/dotfiles.git"
su ${user} -l -c "chezmoi update -v --force"
# https://aur.archlinux.org/packages/ttf-font-nerd-dummy
# I was going to delete it because at the moment the only package that provides ttf-font-nerd is ttf-iosevka-nerd (see this search entry),
# if ttf-iosevka-nerd no longer provides ttf-font-nerd (which can be a possible fix to bug #74050),
# this AUR package will be the only package that provides ttf-font-nerd, in which case it is better deleted.
#if pacman -Rdd ttf-iosevka-nerd --noconfirm; then
# aurinstaller ttf-font-nerd-dummy
#fi
#aurinstaller conky-lua-nv
#aurinstaller ntfysh-bin
#aurinstaller jetbrains-toolbox
# Minecraft-launcher
#aurinstaller polymc-bin
aurinstaller polymc-qt5-bin
# bash beautifier
aurinstaller beautysh
# arandr for wayland
aurinstaller wdisplays
# audio bar
aurinstaller sov
# brightness bar
aurinstaller wob
# logout screen
aurinstaller wlogout
aurinstaller wcp
# SwayNotificationCenter
aurinstaller swaync
# on-screen keyboard (start with wvkbd-mobintl)
aurinstaller wvkbd
# and for x11
aurinstaller svkbd-git
# Visual music player for wayland
aurinstaller vmp
# All your services in one place
#aurinstaller ferdium-bin
# Clipboard Manager
aurinstaller clipman
# OBS-Backgroundremover
aurinstaller obs-backgroundremoval-git
# QT5 Styleplugins (Default GTK Arc-Dark Theme)
aurinstaller qt5-styleplugins
# QT6 Styleplugins (Default GTK Arc-Dark Theme)
aurinstaller qt6gtk2
# Passwortmanager for dmenu (i3)
aurinstaller passdmenu
# Joplin Desktop for Linux, using the system Electron package
aurinstaller joplin-electron
# SwayFX: Sway, but with eye candy!
if pacman -Rss sway --noconfirm; then
echo "Sway erfolgreich entfernt um SwayFX zu installieren :)"
fi
aurinstaller swayfx
# Miracast implementation for GNOME and I3
aurinstaller gnome-network-displays
# Command to simulate input anywhere (X11, Wayland, TTYs)
aurinstaller dotool
# voice control for handsfree computing
#aurinstaller vosk-api-bin
#aurinstaller numen
# Offline Speech to Text for Desktop Linux
aurinstaller python-vosk-bin
aurinstaller nerd-dictation-git
echo '## Give ydotoold access to the uinput device
## Solution by https://github.com/ReimuNotMoe/ydotool/issues/25#issuecomment-535842993
KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"
' > /etc/udev/rules.d/80-uinput.rules
if ! [ -d /home/${user}/.config/nerd-dictation/model ]; then
wget https://alphacephei.com/vosk/models/vosk-model-small-de-0.15.zip
unzip vosk-model-small-de-0.15.zip
mkdir -p /home/${user}/.config/nerd-dictation/
mv vosk-model-small-de-0.15 /home/${user}/.config/nerd-dictation/model
fi
# thinkpad docking station Ultra
#aurinstaller evdi-git
#aurinstaller displaylink
# Systemd Service (zum testen)
#systemctl enable displaylink
# An open-source Linux userspace driver for Valves Steam Deck hardware.
# https://open-sd.gitlab.io/opensd-docs/opensd-docs/latest/users_manual/running.html
#aurinstaller opensd-git
#systemctl --user enable opensd
# MS-Fonts
mkdir -p /etc/fonts/conf.avail/
cp /opt/${repo}/configs/20-no-embedded.conf /etc/fonts/conf.avail/
if ! [ -f "/etc/fonts/conf.d/20-no-embedded.conf" ]; then
ln -s /etc/fonts/conf.avail/20-no-embedded.conf /etc/fonts/conf.d/
fi
# Clear and regenerate your font cache
fc-cache -f -v
# Icons
gsettings set org.gnome.desktop.interface cursor-theme capitaine-cursors
gsettings set org.gnome.desktop.interface gtk-theme Arc-Dark
gsettings set org.gnome.desktop.interface icon-theme Papirus-Dark
gsettings set org.gnome.desktop.wm.preferences theme "Arc-Dark"
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.default-applications.terminal exec wezterm
gsettings set org.gnome.desktop.default-applications.terminal exec-arg start
gtk-update-icon-cache
userrechte
# grub-updater
if [ -d /etc/grub.d ]; then
cp -v /opt/${repo}/configs/grub.d/* /etc/grub.d/
fi
cp /opt/${repo}/scripts/extract-menuentry.py /usr/bin/extract-menuentry.py
mkdir -p /boot/grub/
grub-mkconfig -o /boot/grub/grub.cfg
#aurupdater
add_locale_settings
if pacman -Qdtq; then
echo "Verwaiste Packete werden entfernt :)"
pacman -Rsn $(pacman -Qdtq) --noconfirm
else
echo "Es müssen keine verwaisten Packete entfernt werden :)"
fi
if ! pacman -Syu --needed --noconfirm; then
echo "Konnte Aktualisierung nicht abschliessen!!!"
fi
mkinitcpio -P -c /etc/mkinitcpio.conf
echo "Erstelle Packetverzeichnis!!!"
if [ "${archisoinstall}" == "y" ]; then
mkdir -p ${mountpoint}/etc/systemd/system/getty\@tty1.service.d/
echo "[Service]" > ${mountpoint}/etc/systemd/system/getty\@tty1.service.d/autologin.conf
echo "ExecStart=" >> ${mountpoint}/etc/systemd/system/getty\@tty1.service.d/autologin.conf
echo "ExecStart=-/usr/bin/agetty --autologin ${user} -s %I 115200,38400,9600 vt102" >> ${mountpoint}/etc/systemd/system/getty\@tty1.service.d/autologin.conf
links
rm -Rv /home/${user}/aur-builds
pacman -Qq > /pkglist.txt
if [ $(ls /var/cache/pacman/pkg | wc -w) -gt 0 ]; then
rm -R /var/cache/pacman/pkg/*
fi
if [ -f /root/.bash_history ]; then
rm /root/.bash_history
fi
if [ -f /home/${user}/.bash_history ]; then
rm /home/${user}/.bash_history
fi
fi
echo "$(date "+%Y%m%d-%H%M%S")"
echo "Fertig!!!"
exit 0