feat: massive 082023 update

This commit is contained in:
AngeD 2023-11-08 00:36:37 +01:00
parent 657d788db2
commit 856a444267
21 changed files with 131 additions and 48 deletions

View File

@ -16,9 +16,12 @@ $EDITOR config
./base.sh
```
If you want to install a gui (replace *gui* with your choice):
If you want to install a gui
```bash
$EDITOR gui/config
$EDITOR ./gui/config
./gui/install.sh
$EDITOR ./gui/config
./gui/install.sh
```

18
config
View File

@ -21,21 +21,29 @@ pkg=(
fuse
fzf
git
gnu-netcat
htop
man-{db,pages}
jq
linux{,lts,firmware}
lsof
man-{db,pages} tldr
neofetch
neovim python-neovim
networkmanager
podman{,-docker} docker-compose
neovim{,-lspconfig,-nvim-treesitter} python-pynvim ripgrep tree-sitter-cli
networkmanager iptables-nft systemd-resolved wireguard-tools
p7zip unrar
podman{,-compose}
ranger
reflector
rename{,utils}
rsync
terminus-font awesome-terminal-fonts
tree
udisks2
xdg-user-dirs
zsh
)
laptop_pkg=(
tlp
)
# vim: ft=sh

View File

@ -1,9 +1,11 @@
#!/bin/bash -e
cd
NORMAL='\e[0m'
BOLD='\e[1m'
GREEN='\e[32m'
if [ -t 1 ]; then
NORMAL='\e[0m'
BOLD='\e[1m'
GREEN='\e[32m'
fi
config="git --git-dir $HOME/.dotfiles --work-tree $HOME"
repo='https://git.maby.dev/ange/.dotfiles.git'

View File

@ -1 +0,0 @@
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chmod a+w $sys$devpath/brightness"

View File

@ -1,20 +1,28 @@
# User Variables
# Comment to disable
pkg=(
alacritty
dunst
feh
firefox
flameshot
gammastep
i3lock xss-lock
imagemagick
materia-{gtk-theme,kde} papirus-icon-theme gtk-engine-murrine
mpv
noto-fonts{,-cjk,-emoji} ttf-{dejavu,liberation}
pcmanfm
picom
pipewire{,-pulse,-jack} wireplumber pavucontrol playerctl
polkit-gnome
xorg-{server,xinit,xrandr,xsetroot} xclip
xdg-user-dirs
yt-dlp
zenity
)
flatpakpkg=(
com.valvesoftware.Steam
net.lutris.Lutris
org.getmonero.Monero
org.gimp.GIMP
org.mozilla.Thunderbird
org.mozilla.firefox
)
# vim: ft=sh

11
gui/dwm/config Normal file
View File

@ -0,0 +1,11 @@
# User Variables
# Comment to disable
pkg=(
autorandr
i3lock xss-lock
picom
xorg-{server,xinit,xrandr,xsetroot} xclip
)
# vim: ft=sh

View File

@ -2,9 +2,11 @@
cd "$(dirname "$0")"
. ./config
NORMAL='\e[0m'
BOLD='\e[1m'
GREEN='\e[32m'
if [ -t 1 ]; then
NORMAL='\e[0m'
BOLD='\e[1m'
GREEN='\e[32m'
fi
PACMAN='pacman --noconfirm --needed -Syu'
@ -27,10 +29,10 @@ case "$(lspci -k | grep -A3 -E '(VGA|3D)')" in
esac
$PACMAN "${pkg[@]}"
cp -rfT etc /etc
cp -rfT rootfs /
git clone https://git.maby.dev/ange/suckless /tmp/suckless/
cd "$_"
git clone https://git.maby.dev/ange/suckless.git /tmp/suckless/
cd /tmp/suckless
./update.sh
echo -e "${BOLD}${GREEN}DONE. I recommend you run \`su ${username-\$username} \

View File

@ -1,9 +1,12 @@
#!/bin/bash -e
cd "$(dirname "$0")"
. ./config
NORMAL='\e[0m'
BOLD='\e[1m'
GREEN='\e[32m'
if [ -t 1 ]; then
NORMAL='\e[0m'
BOLD='\e[1m'
GREEN='\e[32m'
fi
PACMAN='pacman --noconfirm --needed -Syu'
@ -12,13 +15,10 @@ if [ "$EUID" != 0 ]; then
exit 1
fi
$PACMAN "${pkg[@]}" flatpak
flatpak install "${flatpakpkg[@]}"
case "$(lspci -k | grep -E '(VGA|3D)')" in
*NVIDIA*)
$PACMAN nvidia{,-utils,-settings}
mkdir -p /etc/pacman.d/hooks/
cp -rfT rootfs_nvidia/ /
modules='nvidia nvidia_modeset nvidia_uvm nvidia_drm'
;;
*AMD*)
$PACMAN mesa vulkan-radeon
modules=amdgpu
@ -27,9 +27,15 @@ case "$(lspci -k | grep -E '(VGA|3D)')" in
$PACMAN mesa vulkan-intel
modules=i915
;;
*NVIDIA*)
$PACMAN nvidia{,-utils,-settings}
modules='nvidia nvidia_modeset nvidia_uvm nvidia_drm'
;;
esac
sed -i "s/^MODULES=(/MODULES=($modules/" /etc/mkinitcpio.conf
mkinitcpio -P
xdg-user-dirs-update
echo -e "${BOLD}${GREEN}GPU drivers install finished.${NORMAL}"

View File

@ -2,9 +2,11 @@
cd "$(dirname "$0")"
. ./config
NORMAL='\e[0m'
BOLD='\e[1m'
GREEN='\e[32m'
if [ -t 1 ]; then
NORMAL='\e[0m'
BOLD='\e[1m'
GREEN='\e[32m'
fi
PACMAN='pacman --noconfirm --needed -Syu'
@ -26,25 +28,23 @@ case "$(lscpu | grep Vendor)" in
esac
sed -i '/^HOOKS=(/s/filesystems/encrypt filesystems/' /etc/mkinitcpio.conf
./gpu.sh
# Packages
$PACMAN "${pkg[@]}" "$cpu-ucode"
systemctl enable \
NetworkManager \
podman.socket \
reflector.timer \
systemctl enable \
NetworkManager \
podman.socket \
reflector.timer \
systemd-resolved \
systemd-timesyncd
if ls -d /sys/class/power_supply/BAT*/ > /dev/null 2>&1; then
$PACMAN "${laptop_pkg[@]}"
cp -rfT rootfs_laptop/ /
systemctl enable tlp
fi
# Users
echo "root:$root_passwd" | chpasswd
useradd -mG wheel "$username" -s "${default_shell-/bin/bash}"
useradd -mG wheel,video "$username" -s "${default_shell-/bin/bash}"
echo "$username:$user_passwd" | chpasswd
su "$username" -c 'xdg-user-dirs-update' 2> /dev/null || true

View File

@ -1,3 +0,0 @@
title Arch Linux (fallback)
linux /vmlinuz-linux
initrd /initramfs-linux-fallback.img

View File

@ -0,0 +1,3 @@
title Arch Linux LTS
linux /vmlinuz-linux-lts
initrd /initramfs-linux-lts.img

View File

@ -0,0 +1,3 @@
[main]
dns=systemd-resolved
systemd-resolved=false

View File

@ -0,0 +1,6 @@
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
COMMIT

View File

@ -4,7 +4,6 @@ Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia
Target=linux*
[Action]
Description=Update NVIDIA module in initcpio

View File

@ -0,0 +1,35 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the resolved.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
#
# See resolved.conf(5) for details.
[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
DNS=1.1.1.1#cloudflare-dns.com
FallbackDNS=1.1.1.1 8.8.8.8
Domains=~.
#DNSSEC=no
DNSOverTLS=yes
#MulticastDNS=yes
#LLMNR=yes
#Cache=yes
#CacheFromLocalhost=no
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
#StaleRetentionSec=0

View File

@ -0,0 +1 @@
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video $sys$devpath/brightness", RUN+="/bin/chmod g+w $sys$devpath/brightness"