|
@@ -53,7 +53,18 @@ curl -O https://download.sublimetext.com/sublimehq-pub.gpg && pacman-key --add s
|
|
|
[ $(grep -c "sublime-text" /etc/pacman.conf) -eq 0 ] && echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | tee -a /etc/pacman.conf
|
|
|
|
|
|
# update and install all packages
|
|
|
-pacman -Syu --noconfirm sudo bash-completion man-db tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs gvfs-mtp gvfs-afc android-udev dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync dhcpcd net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xorg-xprop xdotool xsel pulseaudio libpulse lib32-libpulse openal lib32-openal giflib lib32-giflib mpg123 lib32-mpg123 v4l-utils lib32-v4l-utils opencl-icd-loader lib32-opencl-icd-loader libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-tools vulkan-icd-loader lib32-vulkan-icd-loader arandr feh hsetroot openbox archlinux-xdg-menu picom xarchiver innoextract pavucontrol pasystray python2-xdg xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli discord evince viewnior virtualbox-host-modules-arch virtualbox vagrant obs-studio dia mednafen mame ppsspp lutris steam wine-staging python-pip python-setuptools winetricks sublime-text
|
|
|
+pacman -Syu --noconfirm sudo bash-completion man-db tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs gvfs-mtp gvfs-afc android-udev dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync dhcpcd inetutils net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xorg-xprop xdotool xsel pulseaudio libpulse lib32-libpulse openal lib32-openal giflib lib32-giflib mpg123 lib32-mpg123 v4l-utils lib32-v4l-utils opencl-icd-loader lib32-opencl-icd-loader libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-tools vulkan-icd-loader lib32-vulkan-icd-loader arandr feh hsetroot openbox archlinux-xdg-menu picom xarchiver innoextract pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli discord evince viewnior virtualbox-host-modules-arch virtualbox vagrant obs-studio dia mednafen mame ppsspp lutris steam wine-staging python-pip python-setuptools winetricks sublime-text stress
|
|
|
+
|
|
|
+# install base configuration files from repository
|
|
|
+[ -d /srv/arch-desktop/install ] || git clone https://git.caseydelorme.com/cdelorme/arch-desktop /srv/arch-desktop
|
|
|
+rsync -Pav /srv/arch-desktop/install/ /
|
|
|
+mkdir -p /etc/skel/.config/pulse
|
|
|
+mkdir -p /etc/skel/{desktop,downloads,public,public/templates,documents,music,pictures,videos,git}
|
|
|
+sed "/module-suspend-on-idle/d" /etc/pulse/default.pa > /etc/skel/.config/pulse/default.pa
|
|
|
+# @note: we may want to avoid disabling this on laptops
|
|
|
+sed -i "/module-switch-on-port-available/d" /etc/skel/.config/pulse/default.pa
|
|
|
+rsync -Pav /etc/skel/ "$(getent passwd root | cut -d: -f6)/"
|
|
|
+sed -i "/ssh-add/d" "$(getent passwd root | cut -d: -f6)/.bashrc"
|
|
|
|
|
|
# if the active network device is wireless install connman
|
|
|
[ -d "/sys/class/net/${active_network_device}/wireless" ] && pacman -Syu connman wpa_supplicant openvpn ethtool iwd pptpclient && systemctl enable connman
|
|
@@ -97,6 +108,7 @@ echo "${aur_username} ALL= NOPASSWD: /usr/bin/pacman" > /etc/sudoers.d/${aur_use
|
|
|
export chassistype=$(dmidecode --string chassis-type)
|
|
|
if [[ "$chassistype" = "Laptop" || "$chassistype" = "Portable" || "$chassistype" = "Notebook" || "$chassistype" = "Sub Notebook" ]]; then
|
|
|
pacman -Syu --noconfirm xf86-input-synaptics acpid hdparm sdparm acpilight connman wpa_supplicant openvpn ethtool iwd pptpclient tlp
|
|
|
+ sed "s/panel_items = LTSC/panel_items = LTSBC/g" /etc/.config/tint2/tint2rc > /etc/.config/tint2/tint2rc
|
|
|
systemctl enable connman
|
|
|
systemctl enable acpid
|
|
|
fi
|
|
@@ -130,14 +142,6 @@ if ! which gifduration &> /dev/null; then
|
|
|
chmod a+rx /usr/local/bin/gifduration
|
|
|
fi
|
|
|
|
|
|
-# install prime95
|
|
|
-if ! which mprime &> /dev/null; then
|
|
|
- curl -Lfs "http://www.mersenne.org/ftp_root/gimps/p95v294b8.linux64.tar.gz" > /tmp/prime.tar.gz
|
|
|
- mkdir -p /usr/local/src/prime/
|
|
|
- tar -xf /tmp/prime.tar.gz -C /usr/local/src/prime
|
|
|
- ln -sf /usr/local/src/prime/mprime /usr/local/bin/
|
|
|
-fi
|
|
|
-
|
|
|
# install packer
|
|
|
if ! which packer &> /dev/null; then
|
|
|
curl -Lfs "https://releases.hashicorp.com/packer/1.3.5/packer_1.3.5_linux_amd64.zip" > /tmp/packer.zip
|
|
@@ -157,16 +161,6 @@ fi
|
|
|
groupadd -fr sudo
|
|
|
[ ! -f /etc/sudoers.d/sudo ] && echo '%sudo ALL=(ALL) ALL' > /etc/sudoers.d/sudo
|
|
|
|
|
|
-# install base configuration files from repository
|
|
|
-[ -d /srv/arch-desktop/install ] || git clone https://git.caseydelorme.com/cdelorme/arch-desktop /srv/arch-desktop
|
|
|
-rsync -Pav /srv/arch-desktop/install/ /
|
|
|
-ln -sf .Xdefaults /etc/skel/.Xresources
|
|
|
-mkdir -p /etc/skel/.config/pulse
|
|
|
-sed "/module-suspend-on-idle/d" /etc/pulse/default.pa > /etc/skel/.config/pulse/default.pa
|
|
|
-# @note: we may want to avoid disabling this on laptops
|
|
|
-sed "/module-switch-on-port-available/d" /etc/pulse/default.pa > /etc/skel/.config/pulse/default.pa
|
|
|
-rsync -Pav /etc/skel/ $(getent passwd root | cut -d: -f6)/
|
|
|
-
|
|
|
# update font cache
|
|
|
fc-cache -fr
|
|
|
|
|
@@ -200,7 +194,7 @@ if [[ -n "$username" && -n "$password" ]]; then
|
|
|
useradd -m -s /bin/bash $username
|
|
|
echo "${username}:${password}" | chpasswd -c SHA256
|
|
|
else
|
|
|
- [ $EUID -ne 0 ] && rsync -Pav /etc/skel/ $(getent passwd $username | cut -d: -f6)/
|
|
|
+ [ $EUID -ne 0 ] && rsync -Pav /etc/skel/ "$(getent passwd $username | cut -d: -f6)/"
|
|
|
fi
|
|
|
|
|
|
# add user to standard groups
|
|
@@ -210,17 +204,13 @@ if [[ -n "$username" && -n "$password" ]]; then
|
|
|
systemctl start postgresql
|
|
|
su postgres -c "cd && createuser -ds $username" 2> /dev/null && su $username -c "cd && createdb"
|
|
|
|
|
|
- # configure and generate xdg-user-dirs
|
|
|
- su $username -c "cd && mkdir -p ~/{desktop,downloads,public,documents,music,pictures,videos,git} && xdg-user-dirs-update"
|
|
|
+ # load xdg-user-dirs
|
|
|
+ su $username -c "cd && xdg-user-dirs-update"
|
|
|
update-desktop-database
|
|
|
|
|
|
# generate default (passwordless) ed25519 ssh key if none exists
|
|
|
su $username -c "cd; if [ ! -f ~/.ssh/id_ed25519 ]; then ssh-keygen -q -t ed25519 -N '' -f ~/.ssh/id_ed25519 && cd && chmod 600 ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519.pub; fi"
|
|
|
|
|
|
- # @note: during arch installation systemd will ignore chroot start for user
|
|
|
- # so we have to take the manual route of generating the target symlink.
|
|
|
- su $username -c 'cd; mkdir $HOME/.config/systemd/user/default.target.wants; ln -fs $HOME/.config/systemd/user/ssh-agent.service $HOME/.config/systemd/user/default.target.wants/ssh-agent.service'
|
|
|
-
|
|
|
# install gvm loading from ~/.bash_profile, and the latest go version
|
|
|
su $username -c "if [ ! -d ~/.gvm ]; then GVM_NO_UPDATE_PROFILE=1 bash < <(curl -Ls https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer 2> /dev/null); fi"
|
|
|
su $username -c 'grep "gvm" ~/.bash_profile &> /dev/null || echo -e "\n# load gvm\n! which gvm &> /dev/null && . ~/.gvm/scripts/gvm" >> ~/.bash_profile'
|
|
@@ -238,8 +228,8 @@ if [[ -n "$username" && -n "$password" ]]; then
|
|
|
fi
|
|
|
|
|
|
# symlink shceduled maintenance tasks
|
|
|
-ln -sf /usr/local/bin/system-updates /etc/cron.daily/
|
|
|
-ln -sf /usr/local/bin/disk-maintenance /etc/cron.weekly/
|
|
|
+ln -sf /usr/local/bin/system-updates /etc/cron.daily/system-updates
|
|
|
+ln -sf /usr/local/bin/disk-maintenance /etc/cron.weekly/disk-maintenance
|
|
|
|
|
|
# symlink override vi to vim
|
|
|
ln -sf /usr/bin/vim /usr/local/bin/vi
|