From 5963e536dc96b4180597d6988a63792f9f250d57 Mon Sep 17 00:00:00 2001 From: Yuuki Galaxy Date: Thu, 28 Jul 2022 16:35:09 +0800 Subject: [PATCH] modified: etc/Server/aconfmgr/apply.cmd new file: etc/Server/aconfmgr/files/calamares --- etc/Server/aconfmgr/10-ignores.sh | 7 ++++ etc/Server/aconfmgr/11-etcignore.sh | 28 ++++++++++++++- etc/Server/aconfmgr/20-basestrap.sh | 1 - .../aconfmgr/26-artix-plasma-dinit-20220713.sh | 41 ++++++++++++++++++++++ etc/Server/aconfmgr/30-root-overlay.sh | 13 ++++++- etc/Server/aconfmgr/40-setup.sh | 16 ++++----- etc/Server/aconfmgr/99-unsorted.sh | 37 ------------------- etc/Server/aconfmgr/apply.cmd | 11 +++--- .../calamares/etc/X11/xorg.conf.d/00-keyboard.conf | 7 ++++ etc/Server/aconfmgr/calamares/etc/crypttab | 13 +++++++ etc/Server/aconfmgr/calamares/etc/default/keyboard | 10 ++++++ etc/Server/aconfmgr/calamares/etc/default/locale | 10 ++++++ .../aconfmgr/calamares/etc/local.d/branding.start | 4 +++ .../aconfmgr/calamares/etc/local.d/hostself.sh | 13 +++++++ etc/Server/aconfmgr/calamares/etc/locale.conf | 10 ++++++ etc/Server/aconfmgr/calamares/etc/timezone | 1 + etc/Server/aconfmgr/calamares/etc/vconsole.conf | 1 + etc/Server/aconfmgr/files/calamares | 1 + 18 files changed, 170 insertions(+), 54 deletions(-) create mode 100644 etc/Server/aconfmgr/26-artix-plasma-dinit-20220713.sh delete mode 100644 etc/Server/aconfmgr/99-unsorted.sh create mode 100644 etc/Server/aconfmgr/calamares/etc/X11/xorg.conf.d/00-keyboard.conf create mode 100644 etc/Server/aconfmgr/calamares/etc/crypttab create mode 100644 etc/Server/aconfmgr/calamares/etc/default/keyboard create mode 100644 etc/Server/aconfmgr/calamares/etc/default/locale create mode 100644 etc/Server/aconfmgr/calamares/etc/local.d/branding.start create mode 100644 etc/Server/aconfmgr/calamares/etc/local.d/hostself.sh create mode 100644 etc/Server/aconfmgr/calamares/etc/locale.conf create mode 100644 etc/Server/aconfmgr/calamares/etc/timezone create mode 100644 etc/Server/aconfmgr/calamares/etc/vconsole.conf create mode 120000 etc/Server/aconfmgr/files/calamares diff --git a/etc/Server/aconfmgr/10-ignores.sh b/etc/Server/aconfmgr/10-ignores.sh index 34032dbb7..a545f10be 100644 --- a/etc/Server/aconfmgr/10-ignores.sh +++ b/etc/Server/aconfmgr/10-ignores.sh @@ -4,6 +4,13 @@ IgnorePath '/boot/initramfs-linux-zen.img' IgnorePath '/boot/initramfs-linux-zen-fallback.img' IgnorePath '/etc/mkinitcpio.d/linux-zen.preset' IgnorePath '/usr/lib/modules/*-zen*' +IgnorePath '/boot/vmlinuz-linux' +IgnorePath '/boot/initramfs-linux*' +IgnorePath '/etc/mkinitcpio.d/linux.preset' +IgnorePath '/usr/lib/modules/*-artix1-*' + +# GRUB2 +IgnorePath '/boot/grub/*' # UEFI IgnorePath '/boot/efi/*' diff --git a/etc/Server/aconfmgr/11-etcignore.sh b/etc/Server/aconfmgr/11-etcignore.sh index fdc91faf9..20edaac8c 100644 --- a/etc/Server/aconfmgr/11-etcignore.sh +++ b/etc/Server/aconfmgr/11-etcignore.sh @@ -1,4 +1,8 @@ -IgnorePath '/etc/adjtime' +# self rm files from 'artix-branding-base' +IgnorePath '/etc/local.d/0PS1.start' +IgnorePath '/etc/local.d/consolefont.start' +IgnorePath '/etc/local.d/mkinitcpio.start' + IgnorePath '/etc/fstab' IgnorePath '/etc/group*' IgnorePath '/etc/gshadow*' @@ -12,4 +16,26 @@ IgnorePath '__pycache__' IgnorePath '/etc/.pwd.lock' IgnorePath '/etc/dconf/db/*' IgnorePath '/usr/lib/locale/locale-archive' +IgnorePath '/var/lib/sddm/.cache/*' + +IgnorePath '/etc/issue' +IgnorePath '/etc/lsb-release' +IgnorePath '/etc/machine-id' +IgnorePath '/etc/NetworkManager/system-connections/*' +IgnorePath '/etc/ssh/ssh_host_*' +IgnorePath '/var/lib/NetworkManager/*' +IgnorePath '/var/lib/random-seed' +IgnorePath '/var/lib/sddm/*' +IgnorePath '/var/lib/upower/*' +IgnorePath '/var/spool/anacron/*' +IgnorePath '/var/lib/logrotate.status' +IgnorePath '/etc/cups/subscriptions.conf*' +IgnorePath '/etc/printcap' +IgnorePath '/usr/lib/os-release' +IgnorePath '/etc/machine-id' +IgnorePath '/var/lib/dbus/machine-id' +IgnorePath '/var/lib/syslog-ng/syslog-ng.persist' +# Galaxy +IgnorePath '/.snap*' +IgnorePath '/etc/skel/.bashrc' diff --git a/etc/Server/aconfmgr/20-basestrap.sh b/etc/Server/aconfmgr/20-basestrap.sh index fd4838a49..860db3831 100644 --- a/etc/Server/aconfmgr/20-basestrap.sh +++ b/etc/Server/aconfmgr/20-basestrap.sh @@ -26,4 +26,3 @@ AddPackage os-prober #CopyFile /etc/arch-release #CopyFile /etc/artix-release CreateLink /etc/os-release ../usr/lib/os-release - diff --git a/etc/Server/aconfmgr/26-artix-plasma-dinit-20220713.sh b/etc/Server/aconfmgr/26-artix-plasma-dinit-20220713.sh new file mode 100644 index 000000000..21189d282 --- /dev/null +++ b/etc/Server/aconfmgr/26-artix-plasma-dinit-20220713.sh @@ -0,0 +1,41 @@ +AddPackage cups-dinit # dinit service scripts for cups +CreateLink /etc/dinit.d/boot.d/cupsd /etc/dinit.d/cupsd + +AddPackage networkmanager-dinit # dinit service scripts for networkmanager +CreateLink /etc/dinit.d/boot.d/NetworkManager /etc/dinit.d/NetworkManager + +AddPackage sddm-dinit # dinit service scripts for sddm +CreateLink /etc/dinit.d/boot.d/sddm /etc/dinit.d/sddm + +AddPackage syslog-ng-dinit # dinit service scripts for syslog-ng +CreateLink /etc/dinit.d/boot.d/syslog-ng /etc/dinit.d/syslog-ng + +AddPackage wireless-regdb # Central Regulatory Domain Database + +AddPackage openssh +AddPackage openssh-dinit +CreateLink /etc/dinit.d/boot.d/sshd ../sshd + +CreateLink /etc/dinit.d/boot.d/acpid /etc/dinit.d/acpid +CreateLink /etc/dinit.d/boot.d/bluetoothd /etc/dinit.d/bluetoothd +CreateLink /etc/dinit.d/boot.d/cronie /etc/dinit.d/cronie + +CopyFileTo "calamares/etc/default/locale" "/etc/default/locale" +CopyFileTo "calamares/etc/X11/xorg.conf.d/00-keyboard.conf" "/etc/X11/xorg.conf.d/00-keyboard.conf" +CopyFileTo "calamares/etc/default/keyboard" "/etc/default/keyboard" +#CopyFileTo "calamares/etc/hostname" "/etc/hostname" +CopyFileTo "calamares/etc/local.d/branding.start" "/etc/local.d/branding.start" +CopyFileTo "calamares/etc/locale.conf" "/etc/locale.conf" +CopyFileTo "calamares/etc/timezone" "/etc/timezone" +CopyFileTo "calamares/etc/vconsole.conf" "/etc/vconsole.conf" +CopyFileTo "calamares/etc/crypttab" "/etc/crypttab" + +# from 99-unsorted.sh +CreateDir /var/lib/rpcbind 700 rpc rpc +CreateDir /var/lib/tpm2-tss/system/keystore 2775 tss tss +SetFileProperty /etc/cups/classes.conf mode 600 +SetFileProperty /etc/cups/printers.conf mode 600 +SetFileProperty /usr/bin/newgidmap mode 755 +SetFileProperty /usr/bin/newuidmap mode 755 +SetFileProperty /usr/lib/utempter/utempter group utmp +SetFileProperty /usr/lib/utempter/utempter mode 2755 diff --git a/etc/Server/aconfmgr/30-root-overlay.sh b/etc/Server/aconfmgr/30-root-overlay.sh index fef850a9b..41fb8c1a5 100644 --- a/etc/Server/aconfmgr/30-root-overlay.sh +++ b/etc/Server/aconfmgr/30-root-overlay.sh @@ -11,18 +11,23 @@ QT_QPA_PLATFORMTHEME=gtk QTWEBENGINE_CHROMIUM_FLAGS="-blink-settings=darkModeEnabled=true -enable-features=OverlayScrollbar,OverlayScrollbarFlashAfterAnyScrollUpdate,OverlayScrollbarFlashWhenMouseEnter" EOF -cat >> "$(GetPackageOriginalFile filesystem /etc/hosts)" <> "$HostsFile" < "$(CreateFile /etc/udev/rules.d/jms580583trim.rules)" < "$(CreateFile /etc/sudoers.d/wheel)" +echo '%wheel ALL=(ALL) ALL' > "$(CreateFile /etc/sudoers.d/wheel 440)" # Add user if [[ $aconfmgr_action == "apply" ]]; then @@ -49,4 +41,8 @@ AddPackage python-markdown AddPackage poppler-data #AddPackage gocryptfs AddPackage unarchiver +AddPackage htop +#AddPackage iotop +AddPackage --foreign aconfmgr-git # A configuration manager for Arch Linux +AddPackage --foreign yay # Yet another yogurt. Pacman wrapper and AUR helper written in go. diff --git a/etc/Server/aconfmgr/99-unsorted.sh b/etc/Server/aconfmgr/99-unsorted.sh deleted file mode 100644 index f5ef12f57..000000000 --- a/etc/Server/aconfmgr/99-unsorted.sh +++ /dev/null @@ -1,37 +0,0 @@ - - -# Tuesday, July 26, 2022 PM04:05:33 HKT - Unknown packages - - -AddPackage wireless-regdb # Central Regulatory Domain Database - - -# Tuesday, July 26, 2022 PM04:05:33 HKT - Missing packages - - -RemovePackage crda - - -# Tuesday, July 26, 2022 PM04:05:33 HKT - Unknown foreign packages - - -AddPackage --foreign aconfmgr-git # A configuration manager for Arch Linux - - -# Tuesday, July 26, 2022 PM04:05:33 HKT - New / changed files - - -CreateDir /var/lib/libvirt/images -CreateDir /var/lib/rpcbind 700 rpc rpc -CreateDir /var/lib/sddm '' sddm sddm -CreateDir /var/lib/tpm2-tss/system/keystore 2775 tss tss - - -# Tuesday, July 26, 2022 PM04:05:33 HKT - New file properties - - -SetFileProperty /etc/sudoers.d/wheel mode 440 -SetFileProperty /usr/bin/newgidmap mode 755 -SetFileProperty /usr/bin/newuidmap mode 755 -SetFileProperty /usr/lib/utempter/utempter group utmp -SetFileProperty /usr/lib/utempter/utempter mode 2755 diff --git a/etc/Server/aconfmgr/apply.cmd b/etc/Server/aconfmgr/apply.cmd index 81a93a87b..c7c2b0e2c 100644 --- a/etc/Server/aconfmgr/apply.cmd +++ b/etc/Server/aconfmgr/apply.cmd @@ -2,10 +2,13 @@ mkdir files ln -sf ../root-overlay files/ +ln -sf ../calamares files/ -useradd -m galaxy -usermod -aG wheel galaxy +#useradd -m galaxy +#usermod -aG wheel galaxy -sudo ntpdate -u time.asia.apple.com -sudo hwclock --systohc +#sudo ntpdate -u time.asia.apple.com +#sudo hwclock --systohc +# rsync -ahXUH 192.168.88.189:~/.config/aconfmgr/ . --delete -vrn +# rsync -ahXUH . 192.168.88.189:~/.config/aconfmgr/ -vn diff --git a/etc/Server/aconfmgr/calamares/etc/X11/xorg.conf.d/00-keyboard.conf b/etc/Server/aconfmgr/calamares/etc/X11/xorg.conf.d/00-keyboard.conf new file mode 100644 index 000000000..2d62a007d --- /dev/null +++ b/etc/Server/aconfmgr/calamares/etc/X11/xorg.conf.d/00-keyboard.conf @@ -0,0 +1,7 @@ +# Read and parsed by systemd-localed. It's probably wise not to edit this file +# manually too freely. +Section "InputClass" + Identifier "system-keyboard" + MatchIsKeyboard "on" + Option "XkbLayout" "us" +EndSection diff --git a/etc/Server/aconfmgr/calamares/etc/crypttab b/etc/Server/aconfmgr/calamares/etc/crypttab new file mode 100644 index 000000000..211c8ca13 --- /dev/null +++ b/etc/Server/aconfmgr/calamares/etc/crypttab @@ -0,0 +1,13 @@ +# /etc/crypttab: mappings for encrypted partitions. +# +# Each mapped device will be created in /dev/mapper, so your /etc/fstab +# should use the /dev/mapper/ paths for encrypted devices. +# +# See crypttab(5) for the supported syntax. +# +# NOTE: You need not list your root (/) partition here, but it must be set up +# beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies +# to encrypted swap, which should be set up with mkinitcpio-openswap +# for resume support. +# +# diff --git a/etc/Server/aconfmgr/calamares/etc/default/keyboard b/etc/Server/aconfmgr/calamares/etc/default/keyboard new file mode 100644 index 000000000..3fecbcce9 --- /dev/null +++ b/etc/Server/aconfmgr/calamares/etc/default/keyboard @@ -0,0 +1,10 @@ +# KEYBOARD CONFIGURATION FILE + +# Consult the keyboard(5) manual page. + +XKBMODEL="pc105" +XKBLAYOUT="us" +XKBVARIANT="" +XKBOPTIONS="" + +BACKSPACE="guess" diff --git a/etc/Server/aconfmgr/calamares/etc/default/locale b/etc/Server/aconfmgr/calamares/etc/default/locale new file mode 100644 index 000000000..dc6429b92 --- /dev/null +++ b/etc/Server/aconfmgr/calamares/etc/default/locale @@ -0,0 +1,10 @@ +LANG=en_US.UTF-8 +LC_ADDRESS=en_HK.UTF-8 +LC_IDENTIFICATION=en_HK.UTF-8 +LC_MEASUREMENT=en_HK.UTF-8 +LC_MONETARY=en_HK.UTF-8 +LC_NAME=en_HK.UTF-8 +LC_NUMERIC=en_HK.UTF-8 +LC_PAPER=en_HK.UTF-8 +LC_TELEPHONE=en_HK.UTF-8 +LC_TIME=en_HK.UTF-8 diff --git a/etc/Server/aconfmgr/calamares/etc/local.d/branding.start b/etc/Server/aconfmgr/calamares/etc/local.d/branding.start new file mode 100644 index 000000000..206267743 --- /dev/null +++ b/etc/Server/aconfmgr/calamares/etc/local.d/branding.start @@ -0,0 +1,4 @@ +#!/bin/sh + +neofetch --no_config >| /etc/issue + diff --git a/etc/Server/aconfmgr/calamares/etc/local.d/hostself.sh b/etc/Server/aconfmgr/calamares/etc/local.d/hostself.sh new file mode 100644 index 000000000..d81041027 --- /dev/null +++ b/etc/Server/aconfmgr/calamares/etc/local.d/hostself.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ ! -f /etc/hostname ]; then + echo 'GalaxyVM' > /etc/hostname +fi + +if [ -f /etc/hostname ]; then + echo -ne '\n# This host address\n127.0.0.1\t' >> /etc/hosts + cat /etc/hostname >> /etc/hosts + cp --reflink=auto -Pp /etc/hosts /etc/hosts.init +fi + +rm -f $0 diff --git a/etc/Server/aconfmgr/calamares/etc/locale.conf b/etc/Server/aconfmgr/calamares/etc/locale.conf new file mode 100644 index 000000000..dc6429b92 --- /dev/null +++ b/etc/Server/aconfmgr/calamares/etc/locale.conf @@ -0,0 +1,10 @@ +LANG=en_US.UTF-8 +LC_ADDRESS=en_HK.UTF-8 +LC_IDENTIFICATION=en_HK.UTF-8 +LC_MEASUREMENT=en_HK.UTF-8 +LC_MONETARY=en_HK.UTF-8 +LC_NAME=en_HK.UTF-8 +LC_NUMERIC=en_HK.UTF-8 +LC_PAPER=en_HK.UTF-8 +LC_TELEPHONE=en_HK.UTF-8 +LC_TIME=en_HK.UTF-8 diff --git a/etc/Server/aconfmgr/calamares/etc/timezone b/etc/Server/aconfmgr/calamares/etc/timezone new file mode 100644 index 000000000..6b0cf6f52 --- /dev/null +++ b/etc/Server/aconfmgr/calamares/etc/timezone @@ -0,0 +1 @@ +Asia/Hong_Kong diff --git a/etc/Server/aconfmgr/calamares/etc/vconsole.conf b/etc/Server/aconfmgr/calamares/etc/vconsole.conf new file mode 100644 index 000000000..12b81a1b2 --- /dev/null +++ b/etc/Server/aconfmgr/calamares/etc/vconsole.conf @@ -0,0 +1 @@ +KEYMAP=us diff --git a/etc/Server/aconfmgr/files/calamares b/etc/Server/aconfmgr/files/calamares new file mode 120000 index 000000000..5ad393d38 --- /dev/null +++ b/etc/Server/aconfmgr/files/calamares @@ -0,0 +1 @@ +../calamares \ No newline at end of file -- 2.11.4.GIT