Add network manager configuration
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
d557a65eff
commit
b9b84619ae
4 changed files with 46 additions and 48 deletions
88
install
88
install
|
@ -113,6 +113,7 @@ SYSTEMD_SERVICES=(
|
||||||
"NetworkManager"
|
"NetworkManager"
|
||||||
"org.cups.cupsd"
|
"org.cups.cupsd"
|
||||||
"suspend"
|
"suspend"
|
||||||
|
"systemd-resolved"
|
||||||
"xboxdrv"
|
"xboxdrv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -154,51 +155,51 @@ fi
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Install package manager and packages #
|
# Install package manager and packages #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
print_section "Installing package requirements"
|
# print_section "Installing package requirements"
|
||||||
sudo pacman -S sudo ccache git base-devel --noconfirm --needed
|
# sudo pacman -S sudo ccache git base-devel --noconfirm --needed
|
||||||
|
|
||||||
print_section "Installing yay"
|
# print_section "Installing yay"
|
||||||
is_yay_installed=$(command -v yay)
|
# is_yay_installed=$(command -v yay)
|
||||||
|
|
||||||
# Install yay if not already installed
|
# # Install yay if not already installed
|
||||||
if [ -z "${is_yay_installed}" ]; then
|
# if [ -z "${is_yay_installed}" ]; then
|
||||||
git clone https://aur.archlinux.org/yay.git
|
# git clone https://aur.archlinux.org/yay.git
|
||||||
(
|
# (
|
||||||
cd yay || exit
|
# cd yay || exit
|
||||||
makepkg -si --noconfirm --skippgpcheck
|
# makepkg -si --noconfirm --skippgpcheck
|
||||||
)
|
# )
|
||||||
rm -rf yay
|
# rm -rf yay
|
||||||
else
|
# else
|
||||||
print_log "yay is already installed"
|
# print_log "yay is already installed"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
print_section "Installing native packages"
|
# print_section "Installing native packages"
|
||||||
# List created using: yay -Qqen > packages.native.list
|
# # List created using: yay -Qqen > packages.native.list
|
||||||
package_count=$(< "${PACKAGES_DIR}/packages.native.list" wc -l)
|
# package_count=$(< "${PACKAGES_DIR}/packages.native.list" wc -l)
|
||||||
print_log "Installing ${package_count} packages"
|
# print_log "Installing ${package_count} packages"
|
||||||
yay -Syy > /dev/null 2>&1
|
# yay -Syy > /dev/null 2>&1
|
||||||
yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.native.list"
|
# yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.native.list"
|
||||||
|
|
||||||
print_section "Installing Rust toolchain and components"
|
# print_section "Installing Rust toolchain and components"
|
||||||
rustup toolchain install beta
|
# rustup toolchain install beta
|
||||||
rustup default beta
|
# rustup default beta
|
||||||
rustup component add "${RUST_COMPONENTS[@]}"
|
# rustup component add "${RUST_COMPONENTS[@]}"
|
||||||
rustup default beta
|
# rustup default beta
|
||||||
|
|
||||||
print_section "Installing AUR packages"
|
# print_section "Installing AUR packages"
|
||||||
package_count=$(< "${PACKAGES_DIR}/packages.aur.list" wc -l)
|
# package_count=$(< "${PACKAGES_DIR}/packages.aur.list" wc -l)
|
||||||
# List created using: yay -Qqem > packages.aur.list
|
# # List created using: yay -Qqem > packages.aur.list
|
||||||
print_log "Installing ${package_count} packages"
|
# print_log "Installing ${package_count} packages"
|
||||||
yay -Syy > /dev/null 2>&1
|
# yay -Syy > /dev/null 2>&1
|
||||||
yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.aur.list"
|
# yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.aur.list"
|
||||||
|
|
||||||
print_section "Installing global npm packages"
|
# print_section "Installing global npm packages"
|
||||||
print_log "Installing ${#NPM_PACKAGES[@]} packages"
|
# print_log "Installing ${#NPM_PACKAGES[@]} packages"
|
||||||
npm i -g "${NPM_PACKAGES[@]}"
|
# npm i -g "${NPM_PACKAGES[@]}"
|
||||||
|
|
||||||
print_section "Installing global composer packages"
|
# print_section "Installing global composer packages"
|
||||||
print_log "Installing ${#COMPOSER_PACKAGES[@]} packages"
|
# print_log "Installing ${#COMPOSER_PACKAGES[@]} packages"
|
||||||
composer global require "${COMPOSER_PACKAGES[@]}"
|
# composer global require "${COMPOSER_PACKAGES[@]}"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Creating directories #
|
# Creating directories #
|
||||||
|
@ -298,6 +299,9 @@ do
|
||||||
sudo install -m 644 "${file}" "/etc/systemd/system"
|
sudo install -m 644 "${file}" "/etc/systemd/system"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
print_log "Create symlink for systemd-resolved"
|
||||||
|
sudo ln -sf "/run/systemd/resolve/stub-resolv.conf" "/etc/resolv.conf"
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Enabling systemd services #
|
# 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}"
|
print_log "Copying mkinitcpio.conf to ${YELLOW}/etc/mkinitcpio.conf${RESET}"
|
||||||
sudo install -Dm 644 "${SYSTEM_DIR}/etc/mkinitcpio.conf" "/etc/mkinitcpio.conf"
|
sudo install -Dm 644 "${SYSTEM_DIR}/etc/mkinitcpio.conf" "/etc/mkinitcpio.conf"
|
||||||
|
|
||||||
print_log "Copying resolvconf.conf to ${YELLOW}/etc/resolvconf.conf${RESET}"
|
print_log "Copying dns.conf to ${YELLOW}/etc/NetworkManager/conf.d${RESET}"
|
||||||
sudo install -Dm 644 "${SYSTEM_DIR}/etc/resolvconf.conf" "/etc/resolvconf.conf"
|
sudo install -Dm 644 "${SYSTEM_DIR}/etc/NetworkManager/conf.d/dns.conf" "/etc/NetworkManager/conf.d"
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
2
system/etc/NetworkManager/conf.d/dns.conf
Normal file
2
system/etc/NetworkManager/conf.d/dns.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[main]
|
||||||
|
dns=systemd-resolved
|
|
@ -1,2 +0,0 @@
|
||||||
[main]
|
|
||||||
rc-manager=resolvconf
|
|
|
@ -1,2 +0,0 @@
|
||||||
resolv_conf=/etc/resolv.conf
|
|
||||||
name_servers="127.0.0.1 8.8.8.8"
|
|
Loading…
Add table
Add a link
Reference in a new issue