From 21d3ba58036b35c1febbf090ea1f952c2d482726 Mon Sep 17 00:00:00 2001 From: ange Date: Thu, 7 Mar 2024 18:06:10 +0100 Subject: [PATCH] feat: a lot of updates! --- README.md | 12 ++++---- config | 12 ++++---- {gui => desktop}/config | 7 ++--- {gui => desktop}/dwm/config | 2 +- {gui => desktop}/dwm/install.sh | 0 .../etc/X11/xorg.conf.d/00-keyboard.conf | 0 .../etc/X11/xorg.conf.d/30-touchpad.conf | 0 .../xorg.conf.d/50-mouse-acceleration.conf | 0 {gui => desktop}/dwm/src/install.sh | 6 ++-- {gui => desktop}/install.sh | 0 {gui => desktop}/src/install.sh | 10 +++---- rootfs/etc/NetworkManager/NetworkManager.conf | 1 - rootfs/etc/doas.conf | 1 + rootfs/etc/systemd/resolved.conf | 10 ++++--- rootfs/etc/xdg/reflector/reflector.conf | 4 +++ src/install.sh | 28 +++++-------------- 16 files changed, 40 insertions(+), 53 deletions(-) rename {gui => desktop}/config (78%) rename {gui => desktop}/dwm/config (66%) rename {gui => desktop}/dwm/install.sh (100%) rename {gui => desktop}/dwm/rootfs/etc/X11/xorg.conf.d/00-keyboard.conf (100%) rename {gui => desktop}/dwm/rootfs/etc/X11/xorg.conf.d/30-touchpad.conf (100%) rename {gui => desktop}/dwm/rootfs/etc/X11/xorg.conf.d/50-mouse-acceleration.conf (100%) rename {gui => desktop}/dwm/src/install.sh (70%) rename {gui => desktop}/install.sh (100%) rename {gui => desktop}/src/install.sh (60%) create mode 100644 rootfs/etc/doas.conf create mode 100644 rootfs/etc/xdg/reflector/reflector.conf diff --git a/README.md b/README.md index 40d0b57..9823f3b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ more! Follow the [Pre-installation](https://wiki.archlinux.org/title/Installation_guide#Pre-installation). Once you chrooted in the system, clone this script ```bash -git clone https://git.maby.dev/ange/archinstall /tmp/ai && cd $_ +git clone https://git.maby.dev/ange/archinstall /tmp/ai && cd "$_" ``` To install the base system, run: @@ -16,13 +16,13 @@ $EDITOR config ./base.sh ``` -If you want to install a gui +If you want a desktop install: ```bash -$EDITOR ./gui/config -./gui/install.sh +$EDITOR ./desktop/config +./desktop/install.sh -$EDITOR ./gui/$GUI/config -./gui/$GUI/install.sh +$EDITOR ./desktop/$WM/config +./desktop/$WM/install.sh ``` For the dotfiles, run the script as the newly created user: diff --git a/config b/config index ffd02c5..b9832c6 100644 --- a/config +++ b/config @@ -1,6 +1,7 @@ # User Variables # Comment to disable +#swapfile=2048 swapfile=auto # auto|MB username=ange @@ -23,15 +24,15 @@ pkg=( fuse fzf git - gnu-netcat htop jq - linux{,-lts,-firmware} mkinitcpio + linux{,-lts,-firmware} mkinitcpio {amd,intel}-ucode lsof man-{db,pages} tldr neofetch neovim{,-lspconfig} python-pynvim ripgrep tree-sitter-cli - networkmanager iptables-nft wireguard-tools + networkmanager iptables-nft wireguard-tools bind gnu-netcat + opendoas p7zip unrar podman{,-compose} ranger @@ -39,13 +40,10 @@ pkg=( renameutils perl-rename rsync terminus-font awesome-terminal-fonts + tlp tree udisks2 zsh ) -laptop_pkg=( - tlp -) - # vim: ft=sh diff --git a/gui/config b/desktop/config similarity index 78% rename from gui/config rename to desktop/config index 2b9e98f..83078af 100644 --- a/gui/config +++ b/desktop/config @@ -8,13 +8,14 @@ pkg=( flameshot gammastep imagemagick - keepassxc materia-{gtk-theme,kde} papirus-icon-theme gtk-engine-murrine + monero mpv noto-fonts{,-cjk,-emoji} ttf-{dejavu,liberation} otf-font-awesome + pass{,-otp} pcmanfm - pipewire{,-pulse,-jack} wireplumber pavucontrol playerctl polkit-gnome + wireplumber pipewire-pulse pavucontrol playerctl xdg-user-dirs yt-dlp zenity @@ -23,9 +24,7 @@ pkg=( flatpakpkg=( com.valvesoftware.Steam net.lutris.Lutris - org.getmonero.Monero org.gimp.GIMP - org.mozilla.Thunderbird org.mozilla.firefox ) diff --git a/gui/dwm/config b/desktop/dwm/config similarity index 66% rename from gui/dwm/config rename to desktop/dwm/config index db306ce..4ed5023 100644 --- a/gui/dwm/config +++ b/desktop/dwm/config @@ -5,7 +5,7 @@ pkg=( autorandr i3lock xss-lock picom - xorg-{server,xhost,xinit,xrandr,xsetroot} xclip + xorg-{server,xinit,xrandr,xsetroot} xclip ) # vim: ft=sh diff --git a/gui/dwm/install.sh b/desktop/dwm/install.sh similarity index 100% rename from gui/dwm/install.sh rename to desktop/dwm/install.sh diff --git a/gui/dwm/rootfs/etc/X11/xorg.conf.d/00-keyboard.conf b/desktop/dwm/rootfs/etc/X11/xorg.conf.d/00-keyboard.conf similarity index 100% rename from gui/dwm/rootfs/etc/X11/xorg.conf.d/00-keyboard.conf rename to desktop/dwm/rootfs/etc/X11/xorg.conf.d/00-keyboard.conf diff --git a/gui/dwm/rootfs/etc/X11/xorg.conf.d/30-touchpad.conf b/desktop/dwm/rootfs/etc/X11/xorg.conf.d/30-touchpad.conf similarity index 100% rename from gui/dwm/rootfs/etc/X11/xorg.conf.d/30-touchpad.conf rename to desktop/dwm/rootfs/etc/X11/xorg.conf.d/30-touchpad.conf diff --git a/gui/dwm/rootfs/etc/X11/xorg.conf.d/50-mouse-acceleration.conf b/desktop/dwm/rootfs/etc/X11/xorg.conf.d/50-mouse-acceleration.conf similarity index 100% rename from gui/dwm/rootfs/etc/X11/xorg.conf.d/50-mouse-acceleration.conf rename to desktop/dwm/rootfs/etc/X11/xorg.conf.d/50-mouse-acceleration.conf diff --git a/gui/dwm/src/install.sh b/desktop/dwm/src/install.sh similarity index 70% rename from gui/dwm/src/install.sh rename to desktop/dwm/src/install.sh index f7b75ae..8d0efca 100644 --- a/gui/dwm/src/install.sh +++ b/desktop/dwm/src/install.sh @@ -11,9 +11,7 @@ case "$(lspci -k | grep -A3 -E '(VGA|3D)')" in pac xf86-video-intel ;; *nouveau*) - pac xf86-video-nouveau - ;; - *nvidia*) - pac nvidia{,-utils} + # https://bugs.freedesktop.org/show_bug.cgi?id=94844#c3 + #pac xf86-video-nouveau ;; esac diff --git a/gui/install.sh b/desktop/install.sh similarity index 100% rename from gui/install.sh rename to desktop/install.sh diff --git a/gui/src/install.sh b/desktop/src/install.sh similarity index 60% rename from gui/src/install.sh rename to desktop/src/install.sh index 0d6efd7..e92a358 100644 --- a/gui/src/install.sh +++ b/desktop/src/install.sh @@ -1,20 +1,20 @@ #!/bin/bash -ex -pac "${pkg[@]}" flatpak xdg-desktop-portal-gtk +pac "${pkg[@]}" flatpak xdg-desktop-portal-gtk mesa flatpak install -y "${flatpakpkg[@]}" case "$(lspci -k | grep -E '(VGA|3D)')" in *AMD*) - pac mesa vulkan-radeon + pac vulkan-radeon modules=amdgpu ;; *Intel*) - pac mesa vulkan-intel + pac vulkan-intel modules=i915 ;; *NVIDIA*) - pac nvidia{,-utils,-settings} - modules='nvidia nvidia_modeset nvidia_uvm nvidia_drm' + #pac vulkan-nvk + modules=nouveau ;; esac diff --git a/rootfs/etc/NetworkManager/NetworkManager.conf b/rootfs/etc/NetworkManager/NetworkManager.conf index 1983860..c81a643 100644 --- a/rootfs/etc/NetworkManager/NetworkManager.conf +++ b/rootfs/etc/NetworkManager/NetworkManager.conf @@ -1,3 +1,2 @@ [main] dns=systemd-resolved -systemd-resolved=false diff --git a/rootfs/etc/doas.conf b/rootfs/etc/doas.conf new file mode 100644 index 0000000..dde2edc --- /dev/null +++ b/rootfs/etc/doas.conf @@ -0,0 +1 @@ +permit persist :wheel diff --git a/rootfs/etc/systemd/resolved.conf b/rootfs/etc/systemd/resolved.conf index 250af7f..a734d7c 100644 --- a/rootfs/etc/systemd/resolved.conf +++ b/rootfs/etc/systemd/resolved.conf @@ -6,9 +6,11 @@ # 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. +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# the /etc/systemd/resolved.conf.d/ directory. The latter is generally +# recommended. Defaults can be restored by simply deleting the main +# configuration file and all drop-ins located in /etc/. # # Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config. # @@ -20,7 +22,7 @@ # 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=9.9.9.9#dns.quad9.net -FallbackDNS=1.1.1.1 8.8.8.8 +#FallbackDNS=1.1.1.1#cloudflare-dns.com 9.9.9.9#dns.quad9.net 8.8.8.8#dns.google 2606:4700:4700::1111#cloudflare-dns.com 2620:fe::9#dns.quad9.net 2001:4860:4860::8888#dns.google Domains=~. #DNSSEC=no DNSOverTLS=yes diff --git a/rootfs/etc/xdg/reflector/reflector.conf b/rootfs/etc/xdg/reflector/reflector.conf new file mode 100644 index 0000000..65a7960 --- /dev/null +++ b/rootfs/etc/xdg/reflector/reflector.conf @@ -0,0 +1,4 @@ +--save /etc/pacman.d/mirrorlist +--protocol https +--latest 5 +--sort rate diff --git a/src/install.sh b/src/install.sh index 2a72c9c..4aa1735 100644 --- a/src/install.sh +++ b/src/install.sh @@ -10,28 +10,17 @@ locale-gen echo "LANG=$lang.UTF-8" > /etc/locale.conf echo "$hostname" > /etc/hostname -# Drivers -case "$(lscpu | grep Vendor)" in - *AuthenticAMD*) cpu=amd ;; - *GenuineIntel*) cpu=intel ;; -esac sed -i '/^HOOKS=(/s/filesystems/encrypt filesystems/' /etc/mkinitcpio.conf # Services -pac "$cpu-ucode" -systemctl enable \ - NetworkManager \ - ip6tables \ - iptables \ - podman.socket \ - reflector.timer \ +systemctl enable \ + NetworkManager \ + ip6tables \ + iptables \ + reflector.timer \ systemd-resolved \ - systemd-timesyncd - -if ls -d /sys/class/power_supply/BAT*/ > /dev/null 2>&1; then - pac "${laptop_pkg[@]}" - systemctl enable tlp -fi + systemd-timesyncd \ + tlp # Users echo "root:$root_passwd" | chpasswd @@ -39,8 +28,6 @@ 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 -sed -i '/^#\s*%wheel\s\+ALL=(ALL:ALL)\s\+ALL/s/^#\s*//' /etc/sudoers - # Bootloader bootctl install @@ -55,7 +42,6 @@ options="${options}root=$root" for f in /boot/loader/entries/*.conf; do cat << EOF >> "$f" -initrd /$cpu-ucode.img options $options rw EOF done