diff options
26 files changed, 378 insertions, 72 deletions
diff --git a/files/nvim/init.vim b/files/nvim/init.vim index 6bbb558..e304e94 100644 --- a/files/nvim/init.vim +++ b/files/nvim/init.vim @@ -277,12 +277,10 @@ vim.keymap.set('n', '<C-n>', function() end, { expr = true }) -- Fzf binds. vim.keymap.set('n', '\\', [[:Buffers<CR>]], { silent = true }) -if os.getenv('NIX_SHELL') ~= nil then - vim.keymap.set('n', '<C-i>', [[:GGrep<CR>]], { silent = true }) - vim.keymap.set('n', '<C-\\>', [[:GFiles<CR>]], { silent = true }) - -- Only Neogit bind, handle all further operations from this menu. - vim.keymap.set('n', 'Y', [[:Neogit<CR>]], { silent = true }) -end +vim.keymap.set('n', '<C-i>', [[:GGrep<CR>]], { silent = true }) +vim.keymap.set('n', '<C-\\>', [[:GFiles<CR>]], { silent = true }) +-- Only Neogit bind, handle all further operations from this menu. +vim.keymap.set('n', 'Y', [[:Neogit<CR>]], { silent = true }) EOF command Tabify set noexpandtab | %retab! | set expandtab @@ -35,11 +35,11 @@ ] }, "locked": { - "lastModified": 1736524793, - "narHash": "sha256-UEbNwGorRiNLtzhshxe/2J2BmwGI1cDCDhSYtY8qREU=", + "lastModified": 1736774329, + "narHash": "sha256-GP39XWhiD6bKidoOTfq+82VpFMxG6AcNV4ynKoFWpMU=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "38844e9b3e17948a66b0dea0ce0bcc0355d6d876", + "rev": "705c09ade97041ccc9d04282498af7983874fe19", "type": "github" }, "original": { @@ -198,11 +198,11 @@ ] }, "locked": { - "lastModified": 1736421950, - "narHash": "sha256-RyrX0WFXxFrYvzHNLTIyuk3NcNl3UBykuYru/P0zW5E=", + "lastModified": 1736508663, + "narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=", "owner": "nix-community", "repo": "home-manager", - "rev": "d4aebb947a301b8da8654a804979a738c5c5da50", + "rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc", "type": "github" }, "original": { @@ -218,11 +218,11 @@ ] }, "locked": { - "lastModified": 1736508663, - "narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=", + "lastModified": 1736785676, + "narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=", "owner": "nix-community", "repo": "home-manager", - "rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc", + "rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d", "type": "github" }, "original": { @@ -240,11 +240,11 @@ ] }, "locked": { - "lastModified": 1736409493, - "narHash": "sha256-XezBEaGENmXgndx2gsVxQ0JoHUeQs9OSUZvVx/GDqyQ=", + "lastModified": 1736580596, + "narHash": "sha256-t+BygGMcg1yyyTBXCAJWx4ZnH1StDzbd8CfzQonAJp8=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "9a958cc0aa5241ea3badf44a063a4b0389dc0110", + "rev": "1ddf0b3bfe076fa50b84244e42a55b9234f96083", "type": "github" }, "original": { @@ -259,11 +259,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1736079376, - "narHash": "sha256-DE/PZoasUoex2Y/y2MnHklCXzGoVlHyMLXB56DHl7fY=", + "lastModified": 1736684024, + "narHash": "sha256-FYJ4iFD/2L1CFN/aHjI8HxxSxuPNy4OvW+VCBh41Lzk=", "owner": "nix-community", "repo": "lib-aggregate", - "rev": "ef3ee8050d86486c0f380ddd479370ad33cf83fb", + "rev": "917882a0186d7731a61ede986c701e272f744750", "type": "github" }, "original": { @@ -450,11 +450,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1736039079, - "narHash": "sha256-ONaTdkME8AJMoQjkydnlUNrzQrIWIdeprkRKW0V1UIE=", + "lastModified": 1736643958, + "narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "e506b7786d099e0dec40e1204c555e3562ee9bf8", + "rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181", "type": "github" }, "original": { @@ -473,11 +473,11 @@ ] }, "locked": { - "lastModified": 1736512664, - "narHash": "sha256-/vw0//f1FAwpy6eY3qLGohgohuLWYBDw+iy34wL6M/M=", + "lastModified": 1736781931, + "narHash": "sha256-bmrFKTZcQyQ4o8tzJZa+FMNQAsFRcBGAR1Qg9SA/8OI=", "owner": "nix-community", "repo": "nixpkgs-wayland", - "rev": "ce4056d912438ae120814431657c0d8ef88b0b2f", + "rev": "6dd8c0145109a9b9aff360eb6c4319ba65a890cf", "type": "github" }, "original": { @@ -488,11 +488,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1736344531, - "narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=", + "lastModified": 1736701207, + "narHash": "sha256-jG/+MvjVY7SlTakzZ2fJ5dC3V1PrKKrUEOEE30jrOKA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912", + "rev": "ed4a395ea001367c1f13d34b1e01aa10290f67d6", "type": "github" }, "original": { @@ -527,11 +527,11 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1736538354, - "narHash": "sha256-qPgUE5K/qcgzpQRHzruAgwT/7SCSAOUOyK1qyofe0TY=", + "lastModified": 1736786866, + "narHash": "sha256-JaWZU7wFWsI4rGAemVciyhTxadaZyubJpLqupKLZUtI=", "owner": "nix-community", "repo": "NUR", - "rev": "80b24eed6e716dc5a31a360f8465636a7a2a990f", + "rev": "16ff3063cb4a4cf6fb5f48ca7dc55c27f2ea4891", "type": "github" }, "original": { @@ -650,11 +650,11 @@ }, "locked": { "dir": "packaging/nix", - "lastModified": 1736534482, - "narHash": "sha256-aHDxVKA4GgohIPCDUX9zMF4UnLQR7U6Dj9mOmhZYSoc=", + "lastModified": 1736743784, + "narHash": "sha256-AOzUhOCk1pQboWmCI2BrQ/K7PygcOc5LTt/Wiht1JnY=", "ref": "refs/heads/main", - "rev": "e9cb4d764013d4c8c3d1166f59581da8f56a3d83", - "revCount": 896, + "rev": "2b4eb95a37d8680deb9ec14415743334ec85202e", + "revCount": 898, "submodules": true, "type": "git", "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" diff --git a/hosts/corpa/a5c14e831f7dc522e27a06854abe01f7.png b/hosts/corpa/a5c14e831f7dc522e27a06854abe01f7.png Binary files differnew file mode 100755 index 0000000..81f4e45 --- /dev/null +++ b/hosts/corpa/a5c14e831f7dc522e27a06854abe01f7.png diff --git a/hosts/corpa/image-web.jpg b/hosts/corpa/image-web.jpg Binary files differnew file mode 100755 index 0000000..f3fd8d5 --- /dev/null +++ b/hosts/corpa/image-web.jpg diff --git a/hosts/corpa/winutil.json b/hosts/corpa/winutil.json Binary files differnew file mode 100755 index 0000000..969fed0 --- /dev/null +++ b/hosts/corpa/winutil.json diff --git a/hosts/iroha/scripts/amdgpu-clocks b/hosts/iroha/scripts/amdgpu-clocks new file mode 100755 index 0000000..275f90d --- /dev/null +++ b/hosts/iroha/scripts/amdgpu-clocks @@ -0,0 +1,262 @@ +#!/usr/bin/env bash + +USER_STATES_PATH=${USER_STATES_PATH:-/etc/default/amdgpu-custom-state} +SYS_PPFMASK=/sys/module/amdgpu/parameters/ppfeaturemask +[ ! -r ${SYS_PPFMASK} ] && echo "Can't access ${SYS_PPFMASK}" && exit 2 + +if [ "$1" == "restore" ]; then + RESTORE=true +fi + +function check_ppfeaturemask() { + CURRENT_HEX_MASK=$(printf '%#x' "$(( $(cat ${SYS_PPFMASK}) ))") + # 0x4000 or 14th bit is one indicating if OverDrive has been enabled + OVERDRIVE_MASK=$(printf '%#x' "$(( CURRENT_HEX_MASK & 0x4000 ))") + [ "${OVERDRIVE_MASK}" == "0x4000" ] && return 0 + WANTED_MASK=$(printf '%#x' "$(( CURRENT_HEX_MASK | 0x4000 ))") + echo -n "In order to set custom amdgpu power states, enable OverDrive by " + echo -n "booting the machine with amdgpu.ppfeaturemask=${WANTED_MASK} " + echo "kernel option" && exit 2 +} + +function fill_sclks() { + if [ -z "${3}" ]; then # Vega20 and later ASICs + echo " SCLK state ${1}: ${2}" + SCLK[${1}]="s ${1} ${2%*M[Hh]z}" + else # Vega10 and previous ASICs + echo " SCLK state ${1}: ${2}, ${3}" + SCLK[${1}]="s ${1} ${2%*M[Hh]z} ${3%*mV}" + fi +} + +function fill_mclks() { + if [ -z "${3}" ]; then # Vega20 and later ASICs + echo " MCLK state ${1}: ${2}" + MCLK[${1}]="m ${1} ${2%*M[Hh]z}" + else # Vega10 and previous ASICs + echo " MCLK state ${1}: ${2}, ${3}" + MCLK[${1}]="m ${1} ${2%*M[Hh]z} ${3%*mV}" + fi +} + +function fill_vddccurve() { + if [ $# -eq 3 ]; then + echo " VDDC Curve state $1: ${2} ${3}" + VDDC_CURVE[${1}]="vc ${1} ${2%*M[Hh]z} ${3%*mV}" + elif [ $# -eq 4 ]; then + echo " VDDC Curve state $1: ${2} @ ${4}" + VDDC_CURVE[${1}]="vc ${1} ${2%*M[Hh]z} ${4%*mV}" + else + echo "ERROR: Can't parse '$*', did pp_od_clk_voltage API change again?" + exit 2 + fi +} + +function fill_vddgfx_offset() { + echo " VDD GFX Offset: $1" + VDDGFX_OFFSET="vo ${1%*mV}" +} + +function parse_states() { + mapfile -t STATE_LINES < <(tr -d '\000' < "$1") + for LNNO in "${!STATE_LINES[@]}"; do + LINE="${STATE_LINES[$LNNO]}" + case ${LINE} in + "OD_SCLK:") + state_fill_func=fill_sclks ;; + "OD_MCLK:") + state_fill_func=fill_mclks ;; + "OD_VDDC_CURVE:") + state_fill_func=fill_vddccurve ;; + "VDDC_CURVE_SCLK["[012]"]: "*) + ;; # Just ignoring these for now + "VDDC_CURVE_VOLT["[012]"]: "*) + ;; # Just ignoring these for now + "OD_VDDGFX_OFFSET:") + offset_fill_func=fill_vddgfx_offset ;; + "OD_RANGE:") + echo " Maximum clocks & voltages:";; + "SCLK: "*) + echo " SCLK clock ${LINE##* }" + MAX_SCLK=${LINE##* } + MAX_SCLK=${MAX_SCLK%*M[Hh]z} + ;; + "MCLK: "*) + echo " MCLK clock ${LINE##* }" + MAX_MCLK=${LINE##* } + MAX_MCLK=${MAX_MCLK%*M[Hh]z} + ;; + "VDDGFX_OFFSET: "*) + echo " VDDGFX offset range: ${LINE#*: }" + OFFSET_RANGE=${LINE#*: } + ;; + "VDDC: "*) + echo " VDDC voltage ${LINE##* }" + MAX_VDDC=${LINE##* } + MAX_VDDC=${MAX_VDDC%*mV} + ;; + [0-9]": "*) + $state_fill_func ${LINE%%:*} ${LINE#* } + ;; + [-0-9]*"mV") + $offset_fill_func ${LINE%%:*} ${LINE#* } + ;; + "FORCE_SCLK: "[0-9]*) + echo " Force SCLK state to ${LINE#* }" + FORCE_SCLK=${LINE#* } + ;; + "FORCE_MCLK: "[0-9]*) + echo " Force MCLK state to ${LINE#* }" + FORCE_MCLK=${LINE#* } + ;; + "FORCE_POWER_CAP: "[0-9]*) + MICROWATTS=${LINE#* } + echo " Force power cap to ${MICROWATTS%*000000}W" + FORCE_POWER_CAP=${LINE#* } + ;; + "FORCE_PERF_LEVEL: "[a-z]*) + echo " Force performance level to ${LINE#* }" + FORCE_LEVEL=${LINE#* } + ;; + "FORCE_POWER_PROFILE: "[0-9]*) + echo " Force power profile to ${LINE#* }" + FORCE_PROFILE=${LINE#* } + ;; + "#"*) ;; + "") ;; + *) + echo " Unexpected value in ${1}:$((LNNO + 1))" + exit 2 + ;; + esac + done + if [ "$1" == "${SYS_PP_OD_CLK}" ]; then + DETECTED_MCLK=("${MCLK[@]}") + DETECTED_VDDC_CURVE=("${VDDC_CURVE[@]}") + POWER_LIMIT=$(cat "$PWR_CAP_FILE") + echo " Curent power cap: ${POWER_LIMIT%*000000}W" + fi +} + +function set_custom_states() { + if [ "${RESTORE}" == "true" ] && [ "${FORCE_LEVEL}" == "auto" ]; then + echo manual > "${PWR_LEVEL}" + sleep 0.25 + echo 0 > "${SYS_DPM_SCLK}" 2>&1 + echo 0 > "${SYS_DPM_MCLK}" 2>&1 + sleep 0.25 + fi + for CSTATE in "${SCLK[@]}"; do + echo "${CSTATE}" > "${SYS_PP_OD_CLK}" + done + for MSTATE in "${MCLK[@]}"; do + OLD_MSTATE=${DETECTED_MCLK[$((${MSTATE:3:1}))]} + if [ "${MSTATE}" != "${OLD_MSTATE}" ]; then + echo "${MSTATE}" > "${SYS_PP_OD_CLK}" || + echo "ERROR: echo ${MSTATE} > ${SYS_PP_OD_CLK}" + fi + done + for VDDC_CURVE_STATE in "${VDDC_CURVE[@]}"; do + OLD_CURVE_STATE=${DETECTED_VDDC_CURVE[$((${VDDC_CURVE_STATE:3:1}))]} + if [ "${VDDC_CURVE_STATE}" != "${OLD_CURVE_STATE}" ]; then + echo "${VDDC_CURVE_STATE}" > "${SYS_PP_OD_CLK}" || + echo "ERROR: echo ${VDDC_CURVE_STATE} > ${SYS_PP_OD_CLK}" + fi + done + if [ "${VDDGFX_OFFSET}" ]; then + echo "${VDDGFX_OFFSET}" > "${SYS_PP_OD_CLK}" + fi + echo 'c' > "${SYS_PP_OD_CLK}" + if [ "${FORCE_LEVEL}" ]; then + echo ${FORCE_LEVEL} > ${PWR_LEVEL} + fi + if [ "${FORCE_PROFILE}" ]; then + echo ${FORCE_PROFILE} > ${PWR_PROFILE} + fi + if [ "${FORCE_SCLK}" ]; then + echo "${FORCE_SCLK}" > "${SYS_DPM_SCLK}" + fi + if [ "${FORCE_MCLK}" ]; then + echo "${FORCE_MCLK}" > "${SYS_DPM_MCLK}" + fi + if [ "${FORCE_POWER_CAP}" ]; then + echo "${FORCE_POWER_CAP}" > "${PWR_CAP_FILE}" + fi +} + +function backup_states() { + if [ ! -r "${BACKUP_STATE_FILE}" ]; then + cp "${SYS_PP_OD_CLK}" "${BACKUP_STATE_FILE}" + if [ "${PWR_LEVEL}" == "manual" ]; then + echo "FORCE_POWER_PROFILE: 0" >> "${BACKUP_STATE_FILE}" + fi + echo "FORCE_PERF_LEVEL: $(cat "${PWR_LEVEL}")" >> "${BACKUP_STATE_FILE}" + echo "FORCE_POWER_CAP: $(cat "${PWR_CAP_FILE}")" >> "${BACKUP_STATE_FILE}" + echo "Writen initial backup states to ${BACKUP_STATE_FILE}" + else + echo "Won't write initial state to ${BACKUP_STATE_FILE}, it already exists." + fi +} + +function restore_states() { + if [ -f "${BACKUP_STATE_FILE}" ]; then + echo "Restoring all states to the initial defaults from ${BACKUP_STATE_FILE}" + USER_STATE_FILE=${BACKUP_STATE_FILE} + else + echo "Cant't access initial defaults at ${BACKUP_STATE_FILE}, aborting." + exit 2 + fi +} + +function clear_vars() { + unset SCLK MCLK + unset VDDC_CURVE VDDGFX_OFFSET + unset sys_device sys_hwmons +} + +check_ppfeaturemask + +shopt -s extglob +for USER_STATE_FILE in ${USER_STATES_PATH}*.+(card?|card??|pci:????:??:??.?); do + BACKUP_STATE_FILE=/tmp/${USER_STATE_FILE##*/}.initial + if [[ "${USER_STATE_FILE}" == *"pci"* ]]; then + STATE_PCIDEV=${USER_STATE_FILE#*.} + for CARD in /sys/class/drm/card{?,??}; do + LINK=$(readlink $CARD) + if [ "${LINK}" ]; then + CARD_PCDEV=${LINK%*/drm/card*} + if [[ "${CARD_PCDEV##*/}" == "${STATE_PCIDEV#*:}" ]]; then + sys_device="${CARD}"/device + fi + fi + done + else + sys_device=/sys/class/drm/${USER_STATE_FILE##*.}/device + fi + sys_hwmons=( "${sys_device}"/hwmon/hwmon[0-9] ) + + SYS_PP_OD_CLK=${sys_device}/pp_od_clk_voltage + PWR_LEVEL=${sys_device}/power_dpm_force_performance_level + PWR_PROFILE=${sys_device}/pp_power_profile_mode + SYS_DPM_SCLK=${sys_device}/pp_dpm_sclk + SYS_DPM_MCLK=${sys_device}/pp_dpm_mclk + PWR_CAP_FILE=${sys_hwmons[0]}/power1_cap + + if [ -f "${SYS_PP_OD_CLK}" ]; then + if [ "${RESTORE}" == "true" ]; then + restore_states + else + backup_states + fi + echo "Detecting the state values at ${SYS_PP_OD_CLK}:" + parse_states "${SYS_PP_OD_CLK}" + echo "Verifying user state values at ${USER_STATE_FILE}:" + parse_states "${USER_STATE_FILE}" + echo "Committing custom states to ${SYS_PP_OD_CLK}:" + set_custom_states + echo " Done" + clear_vars + else + echo "WARNING: ${SYS_PP_OD_CLK} does not exist, skipping!" + fi +done diff --git a/hosts/iroha/scripts/gen-dracut b/hosts/iroha/scripts/gen-dracut index 8347f31..9b9501a 100755 --- a/hosts/iroha/scripts/gen-dracut +++ b/hosts/iroha/scripts/gen-dracut @@ -1,2 +1,2 @@ #! /usr/bin/env sh -dracut -a lvm --kver=6.12.8-gentoo --force +dracut -a lvm --kver=6.12.9-gentoo --force diff --git a/hosts/iroha/scripts/mount-nfs b/hosts/iroha/scripts/mount-nfs index 7e3b276..a07f4cf 100755 --- a/hosts/iroha/scripts/mount-nfs +++ b/hosts/iroha/scripts/mount-nfs @@ -1,2 +1,2 @@ #! /usr/bin/env sh -sudo mount -t nfs4 -o noatime,nodiratime,rw,bg,hard,intr,rsize=65536,wsize=65536,tcp,timeo=600,retrans=2,nfsvers=4.1 moyo:$1 $2 +sudo mount -t nfs4 -o noatime,nodiratime,rw,hard,fsc,proto=tcp,timeo=600,retrans=2,nfsvers=4,minorversion=2 moyo:$1 $2 diff --git a/hosts/iroha/scripts/nvidia-fan-speed b/hosts/iroha/scripts/nvidia-fan-speed new file mode 100755 index 0000000..87cc9ec --- /dev/null +++ b/hosts/iroha/scripts/nvidia-fan-speed @@ -0,0 +1,4 @@ +#! /usr/bin/env sh +nvidia-settings --display :0 -q "[gpu:0]/GPUFanControlState" -q "[fan:0]/GPUTargetFanSpeed" +#nvidia-settings --display :0 -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=55" + diff --git a/hosts/iroha/scripts/prepare-gpu b/hosts/iroha/scripts/prepare-gpu index 3779351..f265432 100755 --- a/hosts/iroha/scripts/prepare-gpu +++ b/hosts/iroha/scripts/prepare-gpu @@ -1,3 +1,3 @@ #! /usr/bin/env sh -sudo $HOME/tmp/amdgpu-clocks/amdgpu-clocks +sudo $HOME/scripts/amdgpu-clocks #echo "1" | sudo tee /sys/class/drm/card0/device/pp_power_profile_mode diff --git a/hosts/iroha/scripts/prepare-network-mounts b/hosts/iroha/scripts/prepare-network-mounts index e322194..ea60cd4 100755 --- a/hosts/iroha/scripts/prepare-network-mounts +++ b/hosts/iroha/scripts/prepare-network-mounts @@ -1,5 +1,5 @@ #! /usr/bin/env sh -$HOME/scripts/mount-nfs /home/andrew/c /home/andrew/c -$HOME/scripts/mount-nfs /home/andrew/pics /home/andrew/pics -$HOME/scripts/mount-nfs /mnt/store0/torrents /mnt/store/files/ext/torrents +$HOME/scripts/mount-nfs /srv/nfs/c /home/andrew/c +$HOME/scripts/mount-nfs /srv/nfs/pics /home/andrew/pics +$HOME/scripts/mount-nfs /srv/nfs/torrents /mnt/store/files/ext/torrents diff --git a/hosts/iroha/scripts/prepare-virt b/hosts/iroha/scripts/prepare-virt new file mode 100755 index 0000000..95cc848 --- /dev/null +++ b/hosts/iroha/scripts/prepare-virt @@ -0,0 +1,4 @@ +#! /usr/bin/env sh +touch /dev/shm/looking-glass +chown andrew:kvm /dev/shm/looking-glass +chmod 0666 /dev/shm/looking-glass diff --git a/hosts/iroha/scripts/rebuild-modules b/hosts/iroha/scripts/rebuild-modules index 70d0233..9a0d902 100755 --- a/hosts/iroha/scripts/rebuild-modules +++ b/hosts/iroha/scripts/rebuild-modules @@ -1,4 +1,3 @@ #! /usr/bin/env sh -#sudo emerge --ask --verbose v4l2loopback xpad-noone xone -sudo emerge --ask --verbose v4l2loopback xpad-noone \=games-util/xone-0.3_p20240226 +sudo emerge --ask --verbose v4l2loopback xpad-noone \=games-util/xone-0.3_p20240226 nvidia-drivers diff --git a/hosts/moyo/conf.d/nfs b/hosts/moyo/conf.d/nfs new file mode 100644 index 0000000..45f598f --- /dev/null +++ b/hosts/moyo/conf.d/nfs @@ -0,0 +1,38 @@ +# /etc/conf.d/nfs + +# If you wish to set the port numbers for lockd, +# please see /etc/sysctl.conf + +# Optional services to include in default `/etc/init.d/nfs start` +# For NFSv4 users, you'll want to add "rpc.idmapd" here. +NFS_NEEDED_SERVICES="rpc.idmapd" + +# Options to pass to rpc.nfsd +OPTS_RPC_NFSD="8 -N 3 -V 4 -V 4.1 -V 4.2" + +# Options to pass to rpc.mountd +# ex. OPTS_RPC_MOUNTD="-p 32767" +OPTS_RPC_MOUNTD="" + +# Options to pass to rpc.statd +# ex. OPTS_RPC_STATD="-p 32765 -o 32766" +OPTS_RPC_STATD="-v" + +# Options to pass to rpc.idmapd +OPTS_RPC_IDMAPD="" + +# Options to pass to rpc.gssd +OPTS_RPC_GSSD="" + +# Options to pass to rpc.svcgssd +OPTS_RPC_SVCGSSD="" + +# Options to pass to rpc.rquotad (requires sys-fs/quota) +OPTS_RPC_RQUOTAD="" + +# Timeout (in seconds) for exportfs +EXPORTFS_TIMEOUT=30 + +# Options to set in the nfsd filesystem (/proc/fs/nfsd/). +# Format is <option>=<value>. Multiple options are allowed. +#OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096" diff --git a/hosts/moyo/scripts/export-nfs b/hosts/moyo/scripts/export-nfs index 230f49d..3643fa3 100755 --- a/hosts/moyo/scripts/export-nfs +++ b/hosts/moyo/scripts/export-nfs @@ -1,2 +1,2 @@ #! /usr/bin/env sh -sudo exportfs -o rw,async,insecure,no_subtree_check -i 192.168.0.0/16:$1 +sudo exportfs -o rw,async,insecure,no_subtree_check,crossmnt -i 192.168.0.0/16:$1 diff --git a/hosts/moyo/scripts/mount-luks b/hosts/moyo/scripts/mount-luks index eba9b3f..1d89cd2 100755 --- a/hosts/moyo/scripts/mount-luks +++ b/hosts/moyo/scripts/mount-luks @@ -1,8 +1,10 @@ #! /usr/bin/env sh sudo cryptsetup luksOpen /dev/mapper/moyo--vg1-moyo--store0--raid1 moyo-store0 sudo mount /dev/mapper/moyo-store0 /mnt/store0 -sudo mount --bind /mnt/store0/c /home/andrew/c -sudo mount --bind /mnt/store0/media/pics /home/andrew/pics -$HOME/scripts/export-nfs /home/andrew/c -$HOME/scripts/export-nfs /home/andrew/pics -$HOME/scripts/export-nfs /mnt/store0/torrents +sudo mount --bind /mnt/store0/c /srv/nfs/c +sudo mount --bind /mnt/store0/media/pics /srv/nfs/pics +sudo mount --bind /mnt/store0/torrents /srv/nfs/torrents +$HOME/scripts/export-nfs /srv/nfs +$HOME/scripts/export-nfs /srv/nfs/c +$HOME/scripts/export-nfs /srv/nfs/pics +$HOME/scripts/export-nfs /srv/nfs/torrents diff --git a/hosts/sofue/configuration.nix b/hosts/sofue/configuration.nix index 18a6679..201a4d8 100644 --- a/hosts/sofue/configuration.nix +++ b/hosts/sofue/configuration.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, modulesPath, ... }: let s = config.local; - inherit (import ../../nix/utils.nix) disks; + inherit (import ../../nix/settings.nix) disks; in rec { imports = [ "${modulesPath}/virtualisation/lxc-container.nix" diff --git a/hosts/soy/Scripts/mount-code.sh b/hosts/soy/Scripts/mount-code.sh index 9648342..928c65e 100755 --- a/hosts/soy/Scripts/mount-code.sh +++ b/hosts/soy/Scripts/mount-code.sh @@ -1,2 +1,2 @@ #! /usr/bin/env sh -sudo mount -t nfs4 -o rw,bg,hard,rsize=65536,wsize=65536,tcp,timeo=600,vers=4.1 192.168.1.206:/home/andrew/c /home/andrew/c +sudo mount -t nfs4 -o rw,bg,hard,fsc,proto=tcp,timeo=600,retrans=2,nfsvers=4,minorversion=2 192.168.1.206:/srv/nfs/c /home/andrew/c diff --git a/hosts/yashinoki/configuration.nix b/hosts/yashinoki/configuration.nix index 86d9d8b..8e8b262 100644 --- a/hosts/yashinoki/configuration.nix +++ b/hosts/yashinoki/configuration.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let s = config.local; - inherit (import ../../nix/utils.nix) disks; + inherit (import ../../nix/settings.nix) disks; in { imports = [ ./hardware-configuration.nix @@ -124,7 +124,7 @@ in { users.users.andrew.extraGroups = [ "networkmanager" ]; fileSystems."/home/andrew/c" = { - device = "192.168.1.206:/home/andrew/c"; + device = "moyo:/srv/nfs/c"; fsType = "nfs4"; options = disks.nfs_options; }; diff --git a/nix/gaming.nix b/nix/gaming.nix index 170b565..bc61623 100644 --- a/nix/gaming.nix +++ b/nix/gaming.nix @@ -15,9 +15,9 @@ in { jdk21 retroarch dolphin-emu - #pcsx2 + pcsx2 (ppsspp.override { enableQt = true; }) - #cemu + cemu rpcs3 ryujinx osu-lazer-bin @@ -34,13 +34,8 @@ in { export DXVK_HUD=compiler export DXVK_LOG_LEVEL=none export VKD3D_CONFIG=dxr,small_vram_rebar - #export VKD3D_CONFIG=dxr,disable_uav_compression export VKD3D_DEBUG=none export VKD3D_SHADER_DEBUG=none - #export VKD3D_FEATURE_LEVEL=12_2 - #export VKD3D_SHADER_MODEL=6_7 - #export WINEDLLOVERRIDES="dinput8,loader=n,b" - #export STEAM_COMPAT_MOUNTS=/mnt/ssd/SteamLibrary:/mnt/hdd/Tools export mesa_glthread=true xrandr --output ${s.monitors.monitor1} --primary exec env --unset=SDL_VIDEODRIVER MANGOHUD=1 gamemoderun "$@" diff --git a/nix/programs/sway.nix b/nix/programs/sway.nix index 8b86d86..8206031 100644 --- a/nix/programs/sway.nix +++ b/nix/programs/sway.nix @@ -266,7 +266,7 @@ in { { command = "floating enable"; criteria.class = "cmv.exe"; } { command = "floating enable"; criteria.app_id = "mauri"; } { command = "inhibit_idle fullscreen"; criteria.title = "Parsec"; } - { command = "inhibit_idle fullscreen"; criteria.class = "steam_app_.*"; } + { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = "steam_app_.*"; } { command = "inhibit_idle fullscreen; allow_tearing yes; floating enable"; criteria.app_id = "gamescope"; } { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = ".gamescope-wrapped"; } { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.app_id = "osu!"; } diff --git a/nix/scripts.nix b/nix/scripts.nix index c4146e1..61751e1 100644 --- a/nix/scripts.nix +++ b/nix/scripts.nix @@ -4,6 +4,7 @@ let script-files = [ "dbus-sway-environment" "dmenu-path" + "dmenu-path0" "dmenu-emoji" "cpu-vulns" "battery" diff --git a/nix/settings.nix b/nix/settings.nix new file mode 100644 index 0000000..743529c --- /dev/null +++ b/nix/settings.nix @@ -0,0 +1,8 @@ +{ + disks = { + nfs_options = [ "noatime" "nodiratime" "rw" "bg" "hard" "fsc" "proto=tcp" "timeo=600" "nfsvers=4" "minorversion=2" "x-systemd.automount" "noauto" "x-systemd.idle-timeout=60" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ]; + hdd_options = [ "noatime" ]; + cdrom_options = [ "ro" "user" "noauto" "unhide" ]; + ntfs_options = [ "uid=1000" "gid=100" "rw" "user" "exec" "umask=000" ]; + }; +} diff --git a/nix/utils.nix b/nix/utils.nix deleted file mode 100644 index a0350a0..0000000 --- a/nix/utils.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - disks = { - nfs_options = [ "noatime" "nodiratime" "rw" "bg" "hard" "intr" "rsize=65536" "wsize=65536" "tcp" "timeo=600" "nfsvers=4.1" "x-systemd.automount" "noauto" "x-systemd.idle-timeout=60" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ]; - hdd_options = [ "noatime" ]; - cdrom_options = [ "ro" "user" "noauto" "unhide" ]; - ntfs_options = [ "uid=1000" "gid=100" "rw" "user" "exec" "umask=000" ]; - }; -} diff --git a/scripts/dmenu-path b/scripts/dmenu-path index c353c0d..e0637fe 100755 --- a/scripts/dmenu-path +++ b/scripts/dmenu-path @@ -1,3 +1,3 @@ #! /usr/bin/env sh # https://github.com/ema/dotfiles/blob/fb7f5cab530daba74edefb9cecb401262db063a9/bin/dmenu_path -echo $PATH | tr ':' '\n' | uniq | sed 's#$#/#' | xargs ls -Llu --time-style=+%s | awk '/^(-|l)/ { print $6, $7 }' | sort -rn | cut -d' ' -f 2 +printf $PATH -print0 | tr ':' '\0' | xargs -0 ls -Llu --time-style=+%s | awk '/^(-|l)/ { printf $6" "$7"\n" }' | sort -rn | cut -d' ' -f 2 diff --git a/scripts/dmenu-path0 b/scripts/dmenu-path0 new file mode 100755 index 0000000..0e50457 --- /dev/null +++ b/scripts/dmenu-path0 @@ -0,0 +1,3 @@ +#! /usr/bin/env sh +# https://github.com/ema/dotfiles/blob/fb7f5cab530daba74edefb9cecb401262db063a9/bin/dmenu_path +printf $PATH -print0 | tr ':' '\0' | xargs -0 ls -Llu --time-style=+%s | awk '/^(-|l)/ { printf $6" "$7"\0" }' | sort -zrn | cut -z -d' ' -f 2 |