Overhaul install script

Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
Severin Kaderli 2020-02-02 20:20:32 +01:00
parent ce2413484c
commit b2e45c8af1
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
26 changed files with 692 additions and 407 deletions

33
.install/arch.sh Normal file
View file

@ -0,0 +1,33 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# arch.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Installs arch packages from the offical repositories
output::section "Arch Packages"
# List created using: yay -Qqen > packages.native.list
if output::prompt "Do you want to install Arch packages?"; then
output::log "Updating package database"
yay -Syy |& output::debug
output::success "Package database successfully updated"
package_count=$(< "${INSTALL_DIR}/packages/packages.native.list" wc -l)
output::log "Installing ${package_count} packages"
yay -S \
--asexplicit \
--noconfirm \
--sudoloop \
--needed \
--devel \
--nopgpfetch \
--mflags \
--skippgpcheck \
- < "${INSTALL_DIR}/packages/packages.native.list" |& output::debug
output::success "Packages successfully installed"
fi

33
.install/aur.sh Normal file
View file

@ -0,0 +1,33 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# aur.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Installs arch packages from the AUR
output::section "AUR Packages"
# List created using: yay -Qqem > packages.aur.list
if output::prompt "Do you want to install AUR packages?"; then
output::log "Updating package database"
yay -Syy |& output::debug
output::success "Package database successfully updated"
package_count=$(< "${INSTALL_DIR}/packages/packages.aur.list" wc -l)
output::log "Installing ${package_count} packages. This may take a few hours"
yay -S \
--asexplicit \
--noconfirm \
--sudoloop \
--needed \
--devel \
--nopgpfetch \
--mflags \
--skippgpcheck \
- < "${INSTALL_DIR}/packages/packages.aur.list" |& output::debug
output::success "Packages successfully installed"
fi

23
.install/composer.sh Normal file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# composer.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Installs global composer packages
CONFIG_COMPOSER_PACKAGES=(
"laravel/installer"
)
output::section "Composer"
if output::prompt "Do you want to install global composer packages?"; then
output::log "Installing ${#CONFIG_COMPOSER_PACKAGES[@]} packages"
output::list ${CONFIG_COMPOSER_PACKAGES[@]}
composer global require "${CONFIG_COMPOSER_PACKAGES[@]}" |& output::debug
output::success "Packages successfully installed"
fi

31
.install/directories.sh Normal file
View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# directories.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Creates directories in the home directory
CONFIG_DIRECTORIES=(
".local/log"
".local/share/gnupg"
".local/share/vpn"
"dev/build"
"dev/opensource"
"dev/pkg"
"dev/projects"
"downloads"
"games"
"videos"
)
output::section "Creating directories"
for dir in "${CONFIG_DIRECTORIES[@]}"; do
output::log "Creating directory ${YELLOW}${HOME}/${dir}${DEFAULT}"
mkdir -p "${HOME}/${dir}"
done
output::success "Successfully created directories"

37
.install/etc.sh Normal file
View file

@ -0,0 +1,37 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# etc.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Copies files to /etc
declare -A CONFIG_ETC_FILES
CONFIG_ETC_FILES=(
["/etc/cron.daily/update-mirror"]="755"
["/etc/default/tlp"]="644"
["/etc/docker/daemon.json"]="644"
["/etc/gemrc"]="644"
["/etc/logrotate.d/custom.conf"]="644"
["/etc/mkinitcpio.conf"]="644"
["/etc/NetworkManager/conf.d/dns.conf"]="644"
["/etc/pacman.conf"]="644"
["/etc/resolv.conf"]="644"
["/etc/sudoers.d/severin"]="0440"
["/etc/vconsole.conf"]="644"
["/etc/X11/nvidia-xorg.conf.d/00-keyboard.conf"]="644"
["/etc/X11/nvidia-xorg.conf.d/20-displaylink.conf"]="644"
["/etc/X11/xorg.conf.d/00-keyboard.conf"]="644"
["/etc/X11/xorg.conf.d/20-displaylink.conf"]="644"
["/etc/zsh/zshenv"]="644"
)
output::section "Copying /etc files"
for file in "${!CONFIG_ETC_FILES[@]}"; do
output::log "Copying ${YELLOW}${file}${DEFAULT}"
sudo install -Dm "${CONFIG_ETC_FILES[${file}]}" "${SYSTEM_DIR}${file}" "${file}" |& output::debug
done
output::success "Successfully copied /etc files"

16
.install/fonts.sh Normal file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# fonts.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Setups fonts
output::section "Fonts"
output::log "Prepare xorg fonts"
sudo mkfontdir /usr/share/fonts/75dpi |& output::debug
sudo mkfontdir /usr/share/fonts/100dpi |& output::debug
output::success "Successfully prepared xorg fonts"

26
.install/groups.sh Normal file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# groups.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Adds the current user to the configured groups.
CONFIG_GROUPS=(
"docker"
"log"
"mpd"
"wheel"
"video"
)
output::section "Groups"
output::log "Current user: ${USER}"
for group in "${CONFIG_GROUPS[@]}"; do
output::log "Adding user to group ${YELLOW}${group}${DEFAULT}"
sudo gpasswd -a "${USER}" "${group}" |& output::debug
done
output::success "Successfully added user to groups"

21
.install/issue.sh Normal file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# issue.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Creates the /etc/issue file
output::section "Issue"
output::log "Creating /etc/issue"
{
echo '\e{red}';
< "/etc/hostname" tr '[:lower:]' '[:upper:]' | figlet -f big | sed "s/\\\\/\\\\\\\/g";
echo -e "\\\r (\\\l)";
echo '\e{reset}';
} > "/tmp/issue"
sudo install "/tmp/issue" "/etc/issue" |& output::debug
output::log "Successfully created /etc/issue"

5
.install/lib/lib.sh Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
declare LIB_DIR="$(dirname "${BASH_SOURCE[0]}")"
source "${LIB_DIR}/output.sh"

55
.install/lib/output.sh Executable file
View file

@ -0,0 +1,55 @@
#!/usr/bin/env bash
RESET="$(tput sgr0)"
GREEN="$(tput setaf 2)"
RED="$(tput setaf 1)"
BLUE="$(tput setaf 4)"
DEFAULT="$(tput op)"
YELLOW="$(tput setaf 3)"
BOLD="$(tput bold)"
output::log() {
echo -e "${1}" |& tee -a "${INSTALL_LOG}"
}
output::debug() {
if [ -n "${INSTALL_DEBUG}" ]; then
tee -a "${INSTALL_LOG}"
else
cat > "${INSTALL_LOG}"
fi
}
output::list() {
for element in "${@}"; do
echo -e " - ${element}"
done
}
output::success() {
echo -e " ${GREEN}${DEFAULT} ${1}" |& tee -a "${INSTALL_LOG}"
}
output::question() {
printf " ${YELLOW}${1}${DEFAULT}" |& tee -a "${INSTALL_LOG}"
}
output::error() {
echo -e " ${RED}${DEFAULT} ${1}" |& tee -a "${INSTALL_LOG}"
}
output::section() {
echo -e "\n${BOLD}-- ${1} --${RESET}" |& tee -a "${INSTALL_LOG}"
}
output::prompt() {
output::question "${1} [y/N] "
read -n 1 -r
echo ""
if [[ ${REPLY} =~ ^[yY]$ ]]; then
return 0
fi
return 1
}

15
.install/lockscreen.sh Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# lockscreen.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Sets the lockscreen image
output::section "Lockscreen"
output::log "Setting lockscreen iamge"
betterlockscreen -u "${DOTFILES}/assets/lockscreen.${HOST}.jpg" |& output::debug
output::success "Successfully set lockscreen image"

26
.install/npm.sh Normal file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# npm.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Installs global npm packages
CONFIG_NPM_PACKAGES=(
"@vue/cli"
"eslint"
"gatsby-cli"
"npm-check-updates"
)
output::section "NPM"
if output::prompt "Do you want to install global npm packages?"; then
output::log "Installing ${#CONFIG_NPM_PACKAGES[@]} packages"
output::list ${CONFIG_NPM_PACKAGES[@]}
npm i -g "${CONFIG_NPM_PACKAGES[@]}" |& output::debug
output::success "Packages successfully installed"
fi

15
.install/ntp.sh Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# ntp.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Enables NTP
output::section "NTP"
output::log "Enabling NTP"
sudo timedatectl set-ntp true |& output::debug
output::success "Successfully enabled NTP"

View file

@ -0,0 +1,65 @@
autojump
autokey
betterlockscreen-git
cava
chromium-vaapi-bin
chromium-widevine
citra-qt-git
clonehero
cloog
cutentr-git
displaylink
dolphin-emu-git
dust
escrotum-git
evhz-git
ferdi-bin
flips-git
g810-led-git
gamemode
gitflow-avh
gksu
gotop-bin
isl
jdk-jetbrains
jstest-gtk-git
just
kunst-git
lib32-gamemode
meli-git
melonds-git
minecraft-launcher
mingw-w64-binutils
mingw-w64-crt
mingw-w64-gcc
mingw-w64-headers
mingw-w64-winpthreads
mupen64plus-qt
nerd-fonts-fira-code
nerd-fonts-fira-mono
nvidia-xrun-git
osl
pacaudit
paper-icon-theme
pegasus-frontend-git
phonon-qt4
plata-theme
polybar
python-gspread-git
python-pefile
python2-notify
rpcs3-git
sameboy-git
sxiv-git
tale-git
talk-cli-git
tealdeer
topgrade
ttf-mac-fonts
ttf-ms-fonts
vita3k-git
vvvvvv-git
wine-tkg-staging-fsync-git
xwiimote-git
xwinwrap-git
yay

View file

@ -0,0 +1,324 @@
acpi_call
acpid
adobe-source-code-pro-fonts
adobe-source-sans-pro-fonts
alacritty
alacritty-terminfo
alsa-utils
anki
anthy
arandr
autoconf
automake
autopep8
base
bash
bash-completion
bat
beep
biber
bind-tools
binutils
bison
blueman
bluez-utils
bzip2
calibre
ccache
chromaprint
clang
code
composer
coreutils
cpupower
cronie
cryptsetup
cups
cups-pdf
deluge
device-mapper
diffutils
docker
docker-compose
dunst
e2fsprogs
efibootmgr
ethtool
evince
evtest
exfat-utils
fakeroot
fd
feh
figlet
file
filesystem
filezilla
findutils
firefox
flameshot
flex
fuseiso
gawk
gcc
gcc-libs
gettext
ghex
gimp
git
glances
glibc
gnome-keyring
gnuplot
go-pie
gparted
gpick
gpicview-gtk3
grep
grub
gtk-engine-murrine
gtk-engines
gucharmap
guvcview
gvfs-mtp
gvfs-smb
gzip
hplip
httpie
hyperfine
i3-gaps
i7z
ibus
ibus-anthy
inetutils
inkscape
inotify-tools
intellij-idea-community-edition
iproute2
iputils
java-openjfx
jdk-openjdk
jdk8-openjdk
jfsutils
jpegoptim
jq
jre-openjdk
keepassxc
kvantum-theme-adapta
less
lib32-giflib
lib32-gst-plugins-base-libs
lib32-gtk3
lib32-libpng12
lib32-libpulse
lib32-libva
lib32-mesa
lib32-mpg123
lib32-nvidia-utils
lib32-openal
lib32-v4l-utils
lib32-virtualgl
lib32-vulkan-icd-loader
libgdiplus
libmgba
libreoffice-fresh
libudev0-shim
libva-intel-driver
licenses
light
linux
linux-firmware
linuxconsole
logrotate
lsb-release
lsd
lutris
lvm2
lxappearance
lzop
m4
mailcap
make
man-db
man-pages
mariadb
maven
mdadm
mesa
mesa-demos
meson
mgba-qt
min
mono
mpc
mpd
mpv
mtpfs
mupdf
mupen64plus
namcap
nano
ncdu
ncmpcpp
nemo
nemo-fileroller
nemo-python
neofetch
network-manager-applet
networkmanager
networkmanager-openvpn
newsboat
nextcloud-client
nmap
nodejs
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
npm
nss-mdns
numlockx
nvidia
nvidia-settings
obs-studio
openssh
optipng
ovmf
p7zip
pacman
pacman-contrib
pamixer
pandoc
pandoc-citeproc
pandoc-crossref
patch
pavucontrol
pciutils
perl
perl-archive-zip
picard
picom
powertop
procps-ng
psmisc
pulseaudio
pulseaudio-alsa
pv
pyside2
python-atspi
python-black
python-google-api-python-client
python-libevdev
python-numpy
python-oauth2client
python-pycodestyle
python-pylint
python-pyqt5
python-pyusb
python-reportlab
python2-numpy
python2-service-identity
qt-gstreamer
qt5-gamepad
qt5-graphicaleffects
qt5-styleplugins
qt5-tools
qt5ct
raw-thumbnailer
redshift
reflector
reiserfsprogs
ripgrep
rofi
rsync
rtmidi
ruby
rust-racer
rustup
s-nail
scapy
sd
seahorse
sed
shadow
shellcheck
simple-scan
slock
smartmontools
splint
sqlitebrowser
steam
stfl
streamlink
subversion
sudo
sxhkd
sysfsutils
systemd-sysvcompat
tar
terminus-font
texinfo
texlive-bibtexextra
texlive-core
texlive-fontsextra
texlive-formatsextra
texlive-games
texlive-humanities
texlive-langchinese
texlive-langcyrillic
texlive-langextra
texlive-langgreek
texlive-langjapanese
texlive-langkorean
texlive-latexextra
texlive-music
texlive-pictures
texlive-pstricks
texlive-publishers
texlive-science
tk
tlp
tokei
ttf-croscore
ttf-dejavu
ttf-droid
ttf-fira-code
ttf-fira-mono
ttf-fira-sans
ttf-font-awesome
ttf-hack
ttf-liberation
ttf-roboto
ttf-ubuntu-font-family
tumbler
unrar
usbutils
util-linux
vi
vim
wget
which
whois
winetricks
wireshark-qt
wqy-zenhei
xclip
xdelta3
xdg-user-dirs
xdotool
xf86-video-intel
xfsprogs
xorg-fonts-alias
xorg-fonts-misc
xorg-server
xorg-xbacklight
xorg-xev
xorg-xhost
xorg-xinit
xorg-xmessage
xorg-xprop
xorg-xrandr
xorg-xwininfo
youtube-dl
zathura-pdf-mupdf
zsh
zsh-completions

24
.install/permissions.sh Normal file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# groups.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Sets permissions for folders and files
declare -A CONFIG_PERMISSIONS
CONFIG_PERMISSIONS=(
["${XDG_BIN_HOME}"]="744"
)
output::section "Permissions"
for permission in "${!CONFIG_PERMISSIONS[@]}"; do
output::log "Changing owner of ${YELLOW}${permission}${DEFAULT} to ${YELLOW}${USER}${DEFAULT}"
sudo chown -R "${USER}" "${permission}" |& output::debug
output::log "Changing permission of ${YELLOW}${permission}${DEFAULT} to ${YELLOW}${CONFIG_PERMISSIONS[${permission}]}${DEFAULT}"
sudo chmod -R "${CONFIG_PERMISSIONS[${permission}]}" "${permission}" |& output::debug
done
output::success "Successfully set permissions"

32
.install/prerequisites.sh Normal file
View file

@ -0,0 +1,32 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# prerequisites.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Installs the prerequisites for the installation script.
output::section "Prerequisites"
output::log "Installing requirements for install script"
sudo pacman -S sudo ccache git base-devel --noconfirm --needed |& output::debug
output::success "Requirements successfully installed"
is_yay_installed=$(command -v yay)
output::log "Installing yay"
if [ -z "${is_yay_installed}" ]; then
TMP_DIR=$(mktemp -d)
git clone https://aur.archlinux.org/yay.git "${TMP_DIR}" |& output::debug
(
cd "${TMP_DIR}"|| exit
makepkg -si --noconfirm --skippgpcheck |& output::debug
)
output::success "yay installed"
else
output::success "Yay is already installed"
fi

21
.install/ruby.sh Normal file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# ruby.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Installs ruby gems
CONFIG_RUBY_GEMS=()
output::section "Ruby"
if output::prompt "Do you want to install ruby gems?"; then
output::log "Installing ${#CONFIG_RUBY_GEMS[@]} gems"
output::list ${CONFIG_RUBY_GEMS[@]}
gem install "${CONFIG_RUBY_GEMS[@]}" |& output::debug
output::success "Gems successfully installed"
fi

31
.install/rust.sh Normal file
View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# rust.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Install a Rust toolchain and components using Rustup
CONFIG_RUST_CHANNEL="beta"
CONFIG_RUST_COMPONENTS=(
"clippy"
"rls"
"rustfmt"
)
output::section "Rust"
if output::prompt "Do you want to install a Rust toolchain?"; then
output::log "Installing Rust using ${CONFIG_RUST_CHANNEL} channel"
rustup -q toolchain install "${CONFIG_RUST_CHANNEL}" |& output::debug
rustup -q default "${CONFIG_RUST_CHANNEL}" |& output::debug
output::success "Rust toolchain was installed and activated"
output::log "Installing components for Rust"
output::list ${CONFIG_RUST_COMPONENTS[@]}
rustup -q component add "${CONFIG_RUST_COMPONENTS[@]}" |& output::debug
output::success "Rust components were successfully installed"
fi

15
.install/shell.sh Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# shell.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Sets default shell
output::section "Shell"
output::log "Setting default shell to zsh"
chsh -s "/bin/zsh"
output::success "Successfully set default shell to zsh"

81
.install/symlinks.sh Normal file
View file

@ -0,0 +1,81 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# symlinks.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Creates symlinks
CONFIG_LINKED_FILES_HOME=(
".config/alacritty"
".config/autokey"
".config/bat"
".config/ccache"
".config/cmus"
".config/compton"
".config/cron"
".config/custom"
".config/chromium-flags.conf"
".config/dconf"
".config/dunst"
".config/git"
".config/gtk-2.0"
".config/gtk-3.0"
".config/httpie"
".config/i3"
".config/maven"
".config/mpd"
".config/mpv"
".config/MusicBrainz"
".config/ncmpcpp"
".config/npm"
".config/octave"
".config/pacman"
".config/phpstorm"
".config/polybar"
".config/python"
".config/redshift"
".config/sqlite3"
".config/streamlink"
".config/ssh"
".config/sxhkd"
".config/topgrade.toml"
".config/Trolltech.conf"
".config/user-dirs.dirs"
".config/user-dirs.locale"
".config/vim"
".config/vue"
".config/wget"
".config/X11"
".config/yay"
".config/zathura"
".config/zsh"
".local/bin"
".local/share/gnupg/gpg-agent.conf"
)
declare -A CONFIG_LINKED_FILES
CONFIG_LINKED_FILES=(
["${HOME}/.PhpStorm2019.1"]="${XDG_CONFIG_HOME}/phpstorm"
["${HOME}/.PhpStorm2019.2"]="${XDG_CONFIG_HOME}/phpstorm"
["${HOME}/documents"]="${HOME}/data/Documents"
["${HOME}/music"]="${HOME}/data/Media/Music"
["${HOME}/pictures"]="${HOME}/data/Media/Pictures"
)
output::section "Symlinks"
for file in "${CONFIG_LINKED_FILES_HOME[@]}"; do
output::log "Linking ${YELLOW}\${HOME}/${file}${DEFAULT} to ${YELLOW}\${SYSTEM_DIR}/${file}${DEFAULT}"
rm -rf "${HOME:?}/${file}" |& output::debug
ln -fs "${SYSTEM_DIR}/${file}" "${HOME}/${file}" |& output::debug
done
for file in "${!CONFIG_LINKED_FILES[@]}"; do
output::log "Linking ${YELLOW}${file}${DEFAULT} to ${YELLOW}${CONFIG_LINKED_FILES[${file}]}${DEFAULT}"
rm -rf "${file}" |& output::debug
ln -fs "${CONFIG_LINKED_FILES[${file}]}" "${file}" |& output::debug
done
output::success "Successfully created symlinks"

45
.install/systemd.sh Normal file
View file

@ -0,0 +1,45 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# systemd.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Copies custom systemd services and enables needed services.
CONFIG_SYSTEMD_SERVICES=(
"acpid"
"bluetooth"
"cronie"
"docker"
"NetworkManager"
"org.cups.cupsd"
"suspend"
"systemd-timesyncd"
)
CONFIG_SYSTEMD_USER_SERVICES=(
"mpd"
)
output::section "Copying systemd services"
for service in "${SYSTEM_DIR}/etc/systemd/system/"*; do
output::log "Copying service ${YELLOW}$(basename "${service}")${DEFAULT}"
sudo install -m 644 "${service}" "/etc/systemd/system" |& output::debug
done
output::success "Successfully copied systemd services"
output::section "Enabling systemd services"
for service in "${CONFIG_SYSTEMD_SERVICES[@]}"; do
output::log "Enabling service ${YELLOW}${service}${DEFAULT}"
sudo systemctl enable "${service}" |& output::debug
done
for service in "${CONFIG_SYSTEMD_USER_SERVICES[@]}"; do
output::log "Enabling service ${YELLOW}${service}${DEFAULT}"
systemctl --user enable "${service}" |& output::debug
done
output::success "Successfully enabled systemd services"

21
.install/udev.sh Normal file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# udev.sh
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Copying custom udev rules
output::section "Copying custom udev rules"
for file in "${SYSTEM_DIR}/etc/udev/rules.d/"*.rules; do
output::log "Copying ${YELLOW}$(basename "${file}")${DEFAULT} to ${YELLOW}/etc/udev/rules.d/${DEFAULT}"
sudo cp "${file}" "/etc/udev/rules.d/" |& output::debug
done
output::log "Reload rules"
sudo udevadm control --reload-rules |& output::debug
output::success "Successfully copied udev rules"