diff options
| -rw-r--r-- | mutt/.mailcap | 1 | ||||
| -rwxr-xr-x | scripts/.local/bin/makekernel | 61 | ||||
| -rwxr-xr-x | scripts/.local/bin/pin-compilers | 18 | ||||
| -rwxr-xr-x | scripts/.local/bin/unpin-compilers | 6 | ||||
| -rw-r--r-- | shell/.config/shell/profile | 1 |
5 files changed, 2 insertions, 85 deletions
diff --git a/mutt/.mailcap b/mutt/.mailcap new file mode 100644 index 0000000..9a92e6b --- /dev/null +++ b/mutt/.mailcap @@ -0,0 +1 @@ +text/html; w3m -I %{charset} -T text/html -dump -o display_link_number=1; copiousoutput; diff --git a/scripts/.local/bin/makekernel b/scripts/.local/bin/makekernel deleted file mode 100755 index 8615e65..0000000 --- a/scripts/.local/bin/makekernel +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -KERNEL_SRC_DIR="/usr/src/linux" -KEYDIR="/etc/efikeys/" -KERNEL_NAME="vmlinuz-latest-gentoo" -THREADS="$(grep -c ^processor /proc/cpuinfo)" - -if [ "$(hostname)" = "pc" ]; then - ROOT_DEVICE="/dev/nvme0n1p3" - MICROCODE="amd" - KERNEL_DIR="/boot/efi/gentoo" - BOOT_PARAMS="nvidia-drm.modeset=1" # preventing screen tearing on NVIDIA GPU -elif [ "$(hostname)" = "laptop" ]; then - ROOT_DEVICE="/dev/sda3" - MICROCODE="intel" - KERNEL_DIR="/boot/efi/EFI/gentoo" - BOOT_PARAMS="" -else - echo "Unknown device $(hostname), cannot choose kernel parameters" - exit 1 -fi - -ROOT="/dev/mapper/root" -CRYPT_ROOT="$(blkid -s UUID | grep $ROOT_DEVICE | cut -d' ' -f2 | sed 's/"//g')" -BOOT_PARAMS="ro crypt_root=$CRYPT_ROOT root=$ROOT rootfsype=btrfs rootflags=subvol=@ root_trim=yes lsm=selinux $BOOT_PARAMS" - -printf 'Boot parameters:\n%s\n' "$BOOT_PARAMS" -printf '\"lsblk -f\" output:\n%s\n' "$(lsblk -f)" -printf 'Kernel image will compiled with %s threads and be installed to %s\n' "$THREADS" "$KERNEL_DIR" - -if [ "$(/usr/bin/id -u)" -ne 0 ]; then - echo "Cannot proceed, need root permissions" - exit 1 -fi - -echo "Proceed with kernel compiling? [Y/N]" -read -r answer -if [ "$answer" != "${answer#[Nn]}" ] ;then - echo "Aborted" - exit 1 -fi - -cd "$KERNEL_SRC_DIR" || exit 1 - -# inject $BOOT_PARAMS into kernel config -sed -i "s|^\(CONFIG_CMDLINE=\).*|\1\"$BOOT_PARAMS\"|" .config - -genkernel --no-clean --no-mrproper --no-save-config \ - --microcode="$MICROCODE" \ - --integrated-initramfs --compress-initramfs --compress-initramfs-type=lz4 \ - --luks --no-zfs --btrfs \ - --kernel-config="$KERNEL_SRC_DIR/.config" \ - --kernel-filename="$KERNEL_NAME" \ - --makeopts="-j$THREADS" \ - --loglevel=3 \ - all - -echo "Signing kernel image" -sbsign --key "$KEYDIR/db.key" --cert "$KEYDIR/db.crt" -o "$KERNEL_DIR/$KERNEL_NAME.efi" "/boot/$KERNEL_NAME" - -cd - || exit 1 diff --git a/scripts/.local/bin/pin-compilers b/scripts/.local/bin/pin-compilers deleted file mode 100755 index c3c21cf..0000000 --- a/scripts/.local/bin/pin-compilers +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -pkgs_to_lock="llvm gcc clang" -tmpfile="$(mktemp)" -pinfile="/etc/portage/package.mask/pins" - -for pkg in $pkgs_to_lock; do - echo ">$(qlist -CIve "$pkg")" >> "$tmpfile" -done - -echo "Package mask:" -cat "$tmpfile" - -echo "Commiting mask to $pinfile, need root privileges" -sudo -A cp -v "$tmpfile" "$pinfile" -sudo -A chmod 644 "$pinfile" - -rm -v "$tmpfile" diff --git a/scripts/.local/bin/unpin-compilers b/scripts/.local/bin/unpin-compilers deleted file mode 100755 index 2ca4f07..0000000 --- a/scripts/.local/bin/unpin-compilers +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -pinfile="/etc/portage/package.mask/pins" -if [ -f "$pinfile" ]; then - echo "Removing pin file $pinfile, need root permissions" - sudo -A rm -v "$pinfile" -fi diff --git a/shell/.config/shell/profile b/shell/.config/shell/profile index a4815ac..2f2c77e 100644 --- a/shell/.config/shell/profile +++ b/shell/.config/shell/profile @@ -76,6 +76,7 @@ export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store" export SUDO_ASKPASS="$HOME/.local/bin/pass-askpass" export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH" export W3M_DIR="$XDG_STATE_HOME/w3m" +export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv # xinit #export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" export XSERVERRC="$XDG_CONFIG_HOME/x11/xserverrc" |
