Add network manager configuration

Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
Severin Kaderli 2019-06-12 17:43:29 +02:00
parent d557a65eff
commit b9b84619ae
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
4 changed files with 46 additions and 48 deletions

88
install
View file

@ -113,6 +113,7 @@ SYSTEMD_SERVICES=(
"NetworkManager"
"org.cups.cupsd"
"suspend"
"systemd-resolved"
"xboxdrv"
)
@ -154,51 +155,51 @@ fi
###############################################################################
# Install package manager and packages #
###############################################################################
print_section "Installing package requirements"
sudo pacman -S sudo ccache git base-devel --noconfirm --needed
# print_section "Installing package requirements"
# sudo pacman -S sudo ccache git base-devel --noconfirm --needed
print_section "Installing yay"
is_yay_installed=$(command -v yay)
# print_section "Installing yay"
# is_yay_installed=$(command -v yay)
# Install yay if not already installed
if [ -z "${is_yay_installed}" ]; then
git clone https://aur.archlinux.org/yay.git
(
cd yay || exit
makepkg -si --noconfirm --skippgpcheck
)
rm -rf yay
else
print_log "yay is already installed"
fi
# # Install yay if not already installed
# if [ -z "${is_yay_installed}" ]; then
# git clone https://aur.archlinux.org/yay.git
# (
# cd yay || exit
# makepkg -si --noconfirm --skippgpcheck
# )
# rm -rf yay
# else
# print_log "yay is already installed"
# fi
print_section "Installing native packages"
# List created using: yay -Qqen > packages.native.list
package_count=$(< "${PACKAGES_DIR}/packages.native.list" wc -l)
print_log "Installing ${package_count} packages"
yay -Syy > /dev/null 2>&1
yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.native.list"
# print_section "Installing native packages"
# # List created using: yay -Qqen > packages.native.list
# package_count=$(< "${PACKAGES_DIR}/packages.native.list" wc -l)
# print_log "Installing ${package_count} packages"
# yay -Syy > /dev/null 2>&1
# yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.native.list"
print_section "Installing Rust toolchain and components"
rustup toolchain install beta
rustup default beta
rustup component add "${RUST_COMPONENTS[@]}"
rustup default beta
# print_section "Installing Rust toolchain and components"
# rustup toolchain install beta
# rustup default beta
# rustup component add "${RUST_COMPONENTS[@]}"
# rustup default beta
print_section "Installing AUR packages"
package_count=$(< "${PACKAGES_DIR}/packages.aur.list" wc -l)
# List created using: yay -Qqem > packages.aur.list
print_log "Installing ${package_count} packages"
yay -Syy > /dev/null 2>&1
yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.aur.list"
# print_section "Installing AUR packages"
# package_count=$(< "${PACKAGES_DIR}/packages.aur.list" wc -l)
# # List created using: yay -Qqem > packages.aur.list
# print_log "Installing ${package_count} packages"
# yay -Syy > /dev/null 2>&1
# yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.aur.list"
print_section "Installing global npm packages"
print_log "Installing ${#NPM_PACKAGES[@]} packages"
npm i -g "${NPM_PACKAGES[@]}"
# print_section "Installing global npm packages"
# print_log "Installing ${#NPM_PACKAGES[@]} packages"
# npm i -g "${NPM_PACKAGES[@]}"
print_section "Installing global composer packages"
print_log "Installing ${#COMPOSER_PACKAGES[@]} packages"
composer global require "${COMPOSER_PACKAGES[@]}"
# print_section "Installing global composer packages"
# print_log "Installing ${#COMPOSER_PACKAGES[@]} packages"
# composer global require "${COMPOSER_PACKAGES[@]}"
###############################################################################
# Creating directories #
@ -298,6 +299,9 @@ do
sudo install -m 644 "${file}" "/etc/systemd/system"
done
print_log "Create symlink for systemd-resolved"
sudo ln -sf "/run/systemd/resolve/stub-resolv.conf" "/etc/resolv.conf"
###############################################################################
# Enabling systemd services #
@ -353,12 +357,8 @@ sudo install -Dm 644 "${SYSTEM_DIR}/etc/vconsole.conf" "/etc/vconsole.conf"
print_log "Copying mkinitcpio.conf to ${YELLOW}/etc/mkinitcpio.conf${RESET}"
sudo install -Dm 644 "${SYSTEM_DIR}/etc/mkinitcpio.conf" "/etc/mkinitcpio.conf"
print_log "Copying resolvconf.conf to ${YELLOW}/etc/resolvconf.conf${RESET}"
sudo install -Dm 644 "${SYSTEM_DIR}/etc/resolvconf.conf" "/etc/resolvconf.conf"
print_log "Copying rc-manager.conf to ${YELLOW}/etc/NetworkManager/conf.d${RESET}"
sudo install -Dm 644 "${SYSTEM_DIR}/etc/NetworkManager/conf.d/rc-manager.conf" "/etc/NetworkManager/conf.d"
print_log "Copying dns.conf to ${YELLOW}/etc/NetworkManager/conf.d${RESET}"
sudo install -Dm 644 "${SYSTEM_DIR}/etc/NetworkManager/conf.d/dns.conf" "/etc/NetworkManager/conf.d"
###############################################################################