From fac0c8b79c8666008c3aa9fde15a15b7ebcb5777 Mon Sep 17 00:00:00 2001 From: V Date: Fri, 25 Nov 2022 20:42:32 +0400 Subject: [PATCH] Add .chezmoi.toml Update .bashrc Add .scripts/fuck_nvidia.sh Change attributes of .config/foot/foot.ini Change attributes of .scripts/install_base.sh --- .chezmoi.toml.tmpl | 4 ++++ dot_bashrc | 1 + dot_config/foot/{foot.ini => foot.ini.tmpl} | 0 dot_scripts/executable_fuck_nvidia.sh | 11 +++++++++++ .../{install_base.sh => executable_install_base.sh} | 6 ++++-- 5 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .chezmoi.toml.tmpl rename dot_config/foot/{foot.ini => foot.ini.tmpl} (100%) create mode 100644 dot_scripts/executable_fuck_nvidia.sh rename dot_scripts/{install_base.sh => executable_install_base.sh} (85%) diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl new file mode 100644 index 0000000..464b020 --- /dev/null +++ b/.chezmoi.toml.tmpl @@ -0,0 +1,4 @@ +[git] + autoCommit = true + autoPush = true + diff --git a/dot_bashrc b/dot_bashrc index 02f1455..f87451e 100644 --- a/dot_bashrc +++ b/dot_bashrc @@ -4,6 +4,7 @@ export EDITOR=nvim; export VISUAL=nvim; +alias cfg=chezmoi alias ls='ls --color=auto' PS1='[\u@\h \W]\$ ' diff --git a/dot_config/foot/foot.ini b/dot_config/foot/foot.ini.tmpl similarity index 100% rename from dot_config/foot/foot.ini rename to dot_config/foot/foot.ini.tmpl diff --git a/dot_scripts/executable_fuck_nvidia.sh b/dot_scripts/executable_fuck_nvidia.sh new file mode 100644 index 0000000..6828683 --- /dev/null +++ b/dot_scripts/executable_fuck_nvidia.sh @@ -0,0 +1,11 @@ +#!/bin/sh +paru --needed --noconfirm -Syu nvidia nvidia-utils sway-nvidia # nvidia-vaapi-driver-git #lib32-nvidia-utils-beta +BLCONF=$(find /boot/loader/entries/ -type f -name '*.conf' -print0 | xargs -0 grep -l "arch") +echo "LOADER: ${BLCONF}" + +if grep -R "nvidia_drm.modeset" $BLCONF > /dev/null +then + echo "modeset already set" +else + sudo sed -ie 's/^options.*$/& nvidia_drm.modeset=1/g' ${BLCONF} +fi diff --git a/dot_scripts/install_base.sh b/dot_scripts/executable_install_base.sh similarity index 85% rename from dot_scripts/install_base.sh rename to dot_scripts/executable_install_base.sh index 13875d5..644349a 100755 --- a/dot_scripts/install_base.sh +++ b/dot_scripts/executable_install_base.sh @@ -4,7 +4,7 @@ # - Seriously, don't do this, it's insecure! # Pacman packages -sudo pacman --needed --noconfirm -Syu base-devel htop ranger git screen ncdu neovim pipewire sway swaybg xorg-server xorg-xwayland chezmoi foot polkit openssh +sudo pacman --needed --noconfirm -Syu base-devel htop ranger git screen ncdu neovim pipewire sway swaybg xorg-server xorg-xwayland chezmoi foot polkit openssh firefox-developer-edition # Install Paru if pacman -Qs paru > /dev/null ; then @@ -18,7 +18,7 @@ else fi # AUR Packages -paru --needed --noconfirm -Syu paru-bin ttf-cascadia-code +paru --needed --noconfirm -Syu paru-bin ttf-cascadia-code # Chezmoi apply dotfiles chezmoi init --apply https://inex.dev/v/dotfiles.git @@ -31,3 +31,5 @@ else eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519 fi + +sudo usermod -aG wheel,input,audio,video,lp v